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
commit d23e655c83
Notes: sideshowbarker 2024-07-19 05:27:20 +09:00
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