note a leak that needs fixing eventually
[trinity.git] / syscalls / eventfd2.c
blob7bd875d9e05f83b88c183caec6fd9623a1453b18
1 /*
2 * SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
4 * On success, eventfd() returns a new eventfd file descriptor.
5 * On error, -1 is returned and errno is set to indicate the error.
6 */
8 #define EFD_SEMAPHORE 1
9 #define EFD_CLOEXEC 02000000
10 #define EFD_NONBLOCK 04000
12 #include "sanitise.h"
14 struct syscallentry syscall_eventfd2 = {
15 .name = "eventfd2",
16 .num_args = 2,
17 .arg1name = "count",
18 .arg1type = ARG_LEN,
19 .arg2name = "flags",
20 .arg2type = ARG_LIST,
21 .arg2list = {
22 .num = 3,
23 .values = { EFD_CLOEXEC, EFD_NONBLOCK, EFD_SEMAPHORE },
25 .rettype = RET_FD,