summaryrefslogtreecommitdiff
path: root/lib/libc/poll
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
commitfc00c656c96528112d05cf0edf8631bd5eaea446 (patch)
treea6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /lib/libc/poll
Add build system scaffolding and libc headers
Diffstat (limited to 'lib/libc/poll')
-rw-r--r--lib/libc/poll/poll.c7
-rw-r--r--lib/libc/poll/ppoll.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/libc/poll/poll.c b/lib/libc/poll/poll.c
new file mode 100644
index 00000000..4ff90aa6
--- /dev/null
+++ b/lib/libc/poll/poll.c
@@ -0,0 +1,7 @@
+#include <poll.h>
+#include <syscall.h>
+
+int poll(struct pollfd fds[], nfds_t nfds, int timeout)
+{
+ return syscall(poll, fds, nfds, timeout);
+}
diff --git a/lib/libc/poll/ppoll.c b/lib/libc/poll/ppoll.c
new file mode 100644
index 00000000..a5ab9d5e
--- /dev/null
+++ b/lib/libc/poll/ppoll.c
@@ -0,0 +1,9 @@
+#include <poll.h>
+#include <syscall.h>
+
+int ppoll(struct pollfd fds[], nfds_t nfds,
+ const struct timespec *restrict timeout,
+ const sigset_t *restrict sigmask)
+{
+ return syscall(ppoll, fds, nfds, timeout, sigmask, 8);
+}