15b77d52
1 2 3 4 5 6 7
#include <sys/eventfd.h> #include <unistd.h> int eventfd_read(int fd, eventfd_t *value) { return (sizeof(*value) == read(fd, value, sizeof(*value))) ? 0 : -1; }