diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-15 02:01:33 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-15 02:01:59 +0100 |
| commit | 3b3325f761b09ebbfef04c44eed546cc4fdeb329 (patch) | |
| tree | aa19ea259bcda2410c2b3dd4512f19fb85aeaf8f /lib/libc/sys/eventfd_read.c | |
| parent | 15d2df7811ef3cb79cc3e501d0d5f9b993d42bea (diff) | |
Added aio and eventfd support, along with sleep and yes utilities
Diffstat (limited to 'lib/libc/sys/eventfd_read.c')
| -rw-r--r-- | lib/libc/sys/eventfd_read.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/sys/eventfd_read.c b/lib/libc/sys/eventfd_read.c new file mode 100644 index 00000000..78d73623 --- /dev/null +++ b/lib/libc/sys/eventfd_read.c @@ -0,0 +1,8 @@ +#include <sys/eventfd.h> +#include <syscall.h> +#include <unistd.h> + +int eventfd_read(int fildes, eventfd_t *value) +{ + return (sizeof(*value) == read(fildes, value, sizeof(*value))) ? 0 : -1; +} |
