diff options
author | Anton Kling <anton@kling.gg> | 2024-10-03 16:08:46 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-10-03 16:09:12 +0200 |
commit | 372c633aa22d826bc515213ad4211791440f60f8 (patch) | |
tree | b2de66c9bf612a0a149c65786335a6cebde37840 /userland/libc/include/queue.h | |
parent | 226d861c9ebb7f09f95665d07d9ab5c6b7ed7d6f (diff) |
libc: Add sendfile and queue
Diffstat (limited to 'userland/libc/include/queue.h')
-rw-r--r-- | userland/libc/include/queue.h | 21 |
1 files changed, 21 insertions, 0 deletions
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 <stdint.h> + +#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); |