1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

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().
This commit is contained in:
Nico Weber 2020-06-22 11:41:51 -04:00 committed by Andreas Kling
parent 4b19b99b36
commit d2684a8645
5 changed files with 55 additions and 19 deletions

View file

@ -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