1 #include <sys/eventfd.h>
5 int eventfd(unsigned int count, int flags)
7 return syscall(flags ? SYS_eventfd2 : SYS_eventfd, count, flags);
10 int eventfd_read(int fd, eventfd_t *value)
12 return (sizeof(*value) == read(fd, value, sizeof(*value))) ? 0 : -1;
15 int eventfd_write(int fd, eventfd_t value)
17 return (sizeof(value) == write(fd, &value, sizeof(value))) ? 0 : -1;