7 void set_epoll_descriptor(int fd_epoll
, int action
, int fd_toadd
, int events
)
10 struct epoll_event ev
;
12 memset(&ev
, 0, sizeof(ev
));
14 ev
.data
.fd
= fd_toadd
;
16 ret
= epoll_ctl(fd_epoll
, action
, fd_toadd
, &ev
);
18 panic("Cannot add socket for epoll!\n");
21 int set_epoll_descriptor2(int fd_epoll
, int action
, int fd_toadd
, int events
)
23 struct epoll_event ev
;
25 memset(&ev
, 0, sizeof(ev
));
27 ev
.data
.fd
= fd_toadd
;
29 return epoll_ctl(fd_epoll
, action
, fd_toadd
, &ev
);