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:
2025-05-30 22:13:01 +03:00
parent 8ff9c030bf
commit b1065fa01d
5 changed files with 127 additions and 51 deletions

View File

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

View File

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