about summary refs log tree commit diff
path: root/src/linux/eventfd_read.c
blob: 969e661594eba60974dbcca7f8b034869376ef3a (plain) (blame)
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;
}