简介:大家都知道,这个epoll_ctl系统调用是epoll高效之所在,因为把文件描述符集合的传递与轮询分离,而对目标文件描述符集合的操作就在这个epoll_ctl里面完成。我们先来关注一下数据结构: 第一个是昨天提到的eventpoll,这里就不说了。 大家都知道,这个epoll_ctl系统调用是epoll高效之所在,因为把文件描述符集合的传递...
(intmaxfd)int rc = pollset_destroy(pollset_tps)int rc = pollset_ctl(pollset_t ps, struct poll_ctl *pollctl_array,intarray_length)int rc = pollset_query(pollset_tps,struct pollfd *pollfd_query)int nfound = pollset_poll(pollset_tps,struct pollfd *polldata_array,intarray...
(intmaxfd)int rc = pollset_destroy(pollset_tps)int rc = pollset_ctl(pollset_t ps, struct poll_ctl *pollctl_array,intarray_length)int rc = pollset_query(pollset_tps,struct pollfd *pollfd_query)int nfound = pollset_poll(pollset_tps,struct pollfd *polldata_array,intarray...
int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds, bool nonblock); /* Tells if the epoll_ctl(2) operation needs an event copy from userspace */ static inline int ep_op_has_event(int op) { return op != EPOLL_CTL_DEL; } #else static inline void eventpoll_...
File descriptors must be added to the pollset with the pollset_ctl subroutine before they can be monitored. An array of poll_ctl structures is passed to pollset_ctl through pollctl_array: struct poll_ctl { short cmd; short events; int fd; } Each poll_ctl structure co...
inttimeout)int rc = pollset_ctl_ext(pollset_tps,struct poll_ctl_ext*pollctl_array,intarray_length)int rc = pollset_query_ext(pollset_tps,struct pollfd_ext *pollfd_query)int nfound = pollset_poll_ext(pollset_tps,struct ...
int timeout) int rc = pollset_ctl_ext(pollset_t ps, struct poll_ctl_ext* pollctl_array, int array_length) int rc = pollset_query_ext(pollset_t ps, struct pollfd_ext *pollfd_query) int nfound = pollset_poll_ext(po...
pollset_t ps = pollset_create(intmaxfd)int rc = pollset_destroy(pollset_tps)int rc = pollset_ctl(pollset_t ps, struct poll_ctl *pollctl_array,intarray_length)int rc = pollset_query(pollset_tps,struct pollfd *pollfd_quer...
inttimeout)int rc = pollset_ctl_ext(pollset_tps,struct poll_ctl_ext*pollctl_array,intarray_length)int rc = pollset_query_ext(pollset_tps,struct pollfd_ext *pollfd_query)int nfound = pollset_poll_ext(pollset_tps,struct p...
int timeout) int rc = pollset_ctl_ext(pollset_t ps, struct poll_ctl_ext* pollctl_array, int array_length) int rc = pollset_query_ext(pollset_t ps, struct pollfd_ext *pollfd_query) int nfound = pollset_poll_ext(pol...