From 372c633aa22d826bc515213ad4211791440f60f8 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 3 Oct 2024 16:08:46 +0200 Subject: libc: Add sendfile and queue --- userland/libc/include/queue.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 userland/libc/include/queue.h (limited to 'userland/libc/include/queue.h') diff --git a/userland/libc/include/queue.h b/userland/libc/include/queue.h new file mode 100644 index 0000000..4883871 --- /dev/null +++ b/userland/libc/include/queue.h @@ -0,0 +1,21 @@ +#include + +#define QUEUE_MOD_ADD 0 +#define QUEUE_MOD_CHANGE 1 +#define QUEUE_MOD_DELETE 2 + +#define QUEUE_WAIT_READ (1 << 0) +#define QUEUE_WAIT_WRITE (1 << 1) +#define QUEUE_WAIT_CLOSE (1 << 2) + +struct queue_entry { + int fd; + uint8_t listen; + int data_type; + void *data; +}; + +int queue_create(void); +int queue_mod_entries(int fd, int flag, struct queue_entry *entries, + int num_entries); +int queue_wait(int fd, struct queue_entry *events, int num_events); -- cgit v1.2.3