diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-17 21:59:16 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-10 19:10:55 +0000 |
commit | ba4b408b8bdc2aa0059abaaffe8b16f28aec480b (patch) | |
tree | b4bfe0dc0f5d08e2eb1a596ddb64635c793accc3 | |
parent | a899e14bccb667af243f8fce454160e17ae45c2a (diff) | |
download | mpv-ba4b408b8bdc2aa0059abaaffe8b16f28aec480b.tar.bz2 mpv-ba4b408b8bdc2aa0059abaaffe8b16f28aec480b.tar.xz |
osdep: rename polldev to poll_wrapper
Originally, this was added as purely a shim for macOS. However since we
want to do high resolution polling which is not neccesarily available on
all platforms, making this a generic wrapper for poll functions is
useful so rename it.
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | osdep/poll_wrapper.c (renamed from osdep/polldev.c) | 9 | ||||
-rw-r--r-- | osdep/poll_wrapper.h (renamed from osdep/polldev.h) | 0 | ||||
-rw-r--r-- | osdep/terminal-unix.c | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 6806105caa..91b8e84b15 100644 --- a/meson.build +++ b/meson.build @@ -403,7 +403,7 @@ if posix subprocess_source = files('osdep/subprocess-posix.c') sources += path_source + subprocess_source + \ files('input/ipc-unix.c', - 'osdep/polldev.c', + 'osdep/poll_wrapper.c', 'osdep/terminal-unix.c', 'sub/filter_regex.c') endif diff --git a/osdep/polldev.c b/osdep/poll_wrapper.c index dc86d5d022..e4ad0f698a 100644 --- a/osdep/polldev.c +++ b/osdep/poll_wrapper.c @@ -1,6 +1,4 @@ /* - * poll shim that supports device files on macOS. - * * This file is part of mpv. * * mpv is free software; you can redistribute it and/or @@ -22,9 +20,12 @@ #include <sys/select.h> #include <stdio.h> -#include "osdep/polldev.h" +#include "poll_wrapper.h" + -int polldev(struct pollfd fds[], nfds_t nfds, int timeout) { +// poll shim that supports device files on macOS. +int polldev(struct pollfd fds[], nfds_t nfds, int timeout) +{ #ifdef __APPLE__ int maxfd = 0; fd_set readfds, writefds; diff --git a/osdep/polldev.h b/osdep/poll_wrapper.h index 8593c1e77c..8593c1e77c 100644 --- a/osdep/polldev.h +++ b/osdep/poll_wrapper.h diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index e03599d829..fabaf402e5 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -31,7 +31,7 @@ #include "osdep/io.h" #include "osdep/threads.h" -#include "osdep/polldev.h" +#include "osdep/poll_wrapper.h" #include "common/common.h" #include "misc/bstr.h" |