From f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:52 -0500 Subject: build: Build mlibc + add distclean target Signed-off-by: Ian Moffett --- lib/mlibc/options/linux/generic/sys-eventfd.cpp | 45 ------------------------- 1 file changed, 45 deletions(-) delete mode 100644 lib/mlibc/options/linux/generic/sys-eventfd.cpp (limited to 'lib/mlibc/options/linux/generic/sys-eventfd.cpp') diff --git a/lib/mlibc/options/linux/generic/sys-eventfd.cpp b/lib/mlibc/options/linux/generic/sys-eventfd.cpp deleted file mode 100644 index 1d83d8c..0000000 --- a/lib/mlibc/options/linux/generic/sys-eventfd.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include - -#include -#include - -int eventfd(unsigned int initval, int flags) { - int fd = 0; - - MLIBC_CHECK_OR_ENOSYS(mlibc::sys_eventfd_create, -1); - if (int e = mlibc::sys_eventfd_create(initval, flags, &fd); e) { - errno = e; - return -1; - } - - return fd; -} - -int eventfd_read(int fd, eventfd_t *value) { - ssize_t bytes_read; - if (int e = mlibc::sys_read(fd, value, 8, &bytes_read); e) { - errno = e; - return -1; - } - - if (bytes_read != 8) { - return -1; - } - - return 0; -} - -int eventfd_write(int fd, eventfd_t value) { - ssize_t bytes_written; - if (int e = mlibc::sys_write(fd, &value, 8, &bytes_written); e) { - errno = e; - return -1; - } - - if (bytes_written != 8) { - return -1; - } - - return 0; -} -- cgit v1.2.3