summaryrefslogtreecommitdiff
path: root/userland/libc/queue.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-10-03 16:08:46 +0200
committerAnton Kling <anton@kling.gg>2024-10-03 16:09:12 +0200
commit372c633aa22d826bc515213ad4211791440f60f8 (patch)
treeb2de66c9bf612a0a149c65786335a6cebde37840 /userland/libc/queue.c
parent226d861c9ebb7f09f95665d07d9ab5c6b7ed7d6f (diff)
libc: Add sendfile and queue
Diffstat (limited to 'userland/libc/queue.c')
-rw-r--r--userland/libc/queue.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/userland/libc/queue.c b/userland/libc/queue.c
new file mode 100644
index 0000000..6d4d380
--- /dev/null
+++ b/userland/libc/queue.c
@@ -0,0 +1,15 @@
+#include <queue.h>
+#include <syscall.h>
+
+int queue_create(void) {
+ RC_ERRNO(syscall(SYS_QUEUE_CREATE, 0, 0, 0, 0, 0));
+}
+
+int queue_mod_entries(int fd, int flag, struct queue_entry *entries,
+ int num_entries) {
+ RC_ERRNO(syscall(SYS_QUEUE_MOD_ENTRIES, fd, flag, entries, num_entries, 0));
+}
+
+int queue_wait(int fd, struct queue_entry *events, int num_events) {
+ RC_ERRNO(syscall(SYS_QUEUE_WAIT, fd, events, num_events, 0, 0));
+}