1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:47:35 +00:00

LibC: Implement pselect

pselect() is similar() to select(), but it takes its timeout
as timespec instead of as timeval, and it takes an additional
sigmask parameter.

Change the sys$select parameters to match pselect() and implement
select() in terms of pselect().
This commit is contained in:
Nico Weber 2020-06-21 13:54:41 -04:00 committed by Andreas Kling
parent 29f509a2a0
commit d23e655c83
6 changed files with 46 additions and 19 deletions

View file

@ -27,6 +27,7 @@
#pragma once
#include <fd_set.h>
#include <signal.h>
#include <string.h>
#include <sys/cdefs.h>
#include <sys/types.h>
@ -34,5 +35,6 @@
__BEGIN_DECLS
int select(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, struct timeval* timeout);
int pselect(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, const struct timespec* timeout, const sigset_t* sigmask);
__END_DECLS