1 /* epoll related fds */
9 #include <sys/eventfd.h>
21 void open_epoll_fds(void)
26 while (i
< MAX_EPOLL_FDS
) {
31 fd
= epoll_create1(EPOLL_CLOEXEC
);
34 shm
->epoll_fds
[i
] = fd
;
35 output(2, "fd[%d] = epoll\n", shm
->epoll_fds
[i
]);
41 int rand_epoll_fd(void)
43 return shm
->epoll_fds
[rand() % MAX_EPOLL_FDS
];