Kernel/LibC: Add ppoll syscall and fix poll
poll is now using its own syscall instead of wrapping aroung pselect. This adds less overhead on top of poll and adds support for POLLHUP
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
struct pollfd
|
||||
{
|
||||
int fd; /* The following descriptor being polled. */
|
||||
@@ -28,6 +30,7 @@ typedef unsigned long nfds_t;
|
||||
#define POLLNVAL 0x200
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ __BEGIN_DECLS
|
||||
O(SYS_CONNECT, connect) \
|
||||
O(SYS_LISTEN, listen) \
|
||||
O(SYS_PSELECT, pselect) \
|
||||
O(SYS_PPOLL, ppoll) \
|
||||
O(SYS_TRUNCATE, truncate) \
|
||||
O(SYS_SMO_CREATE, smo_create) \
|
||||
O(SYS_SMO_DELETE, smo_delete) \
|
||||
|
||||
Reference in New Issue
Block a user