diff options
author | Nico Weber <thakis@chromium.org> | 2020-06-22 11:41:51 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-23 14:12:20 +0200 |
commit | d2684a86458087a7771975ac1cb72bb2fb5f444a (patch) | |
tree | df6f8e78d7b43c11e5761a2efaa86ad746fd5e45 /Libraries/LibC/poll.h | |
parent | 4b19b99b36bb058394a251d42f5aa331c1627b35 (diff) | |
download | serenity-d2684a86458087a7771975ac1cb72bb2fb5f444a.zip |
LibC+Kernel: Implement ppoll
ppoll() is similar() to poll(), but it takes its timeout
as timespec instead of as int, and it takes an additional
sigmask parameter.
Change the sys$poll parameters to match ppoll() and implement
poll() in terms of ppoll().
Diffstat (limited to 'Libraries/LibC/poll.h')
-rw-r--r-- | Libraries/LibC/poll.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Libraries/LibC/poll.h b/Libraries/LibC/poll.h index 051357249a..af0ff254c5 100644 --- a/Libraries/LibC/poll.h +++ b/Libraries/LibC/poll.h @@ -26,6 +26,7 @@ #pragma once +#include <signal.h> #include <sys/cdefs.h> __BEGIN_DECLS @@ -43,6 +44,9 @@ struct pollfd { short revents; }; -int poll(struct pollfd* fds, int nfds, int timeout); +typedef unsigned nfds_t; + +int poll(struct pollfd* fds, nfds_t nfds, int timeout); +int ppoll(struct pollfd* fds, nfds_t nfds, const struct timespec* timeout, const sigset_t* sigmask); __END_DECLS |