从kernel.org联的,在所述的http://man7.org/linux/man-pages/man2/epoll_ctl.2.html手册页,声明epoll_ctl过程如下: int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
可以明显看出,所述event参数被声明为指向struct epoll_eve
我很少知道epoll,检查一些文件,然后想后,运行这样的: while(true){
epoll_wait(some_sock_fds);
foreach(usable_fds){
handler(one_fd); <----- this function must be non-blocking ?
}
}
在handler功能应该有一些关于网络的
epoll_insert功能被sys_epoll_ctl调用。 有在epoll_insert功能的一些关键步骤: 使用队列回调初始化调查表:ep_ptable_queue_proc 而且它会调用file->f_op->poll 如果该文件是已经“准备就绪”,然后我们将其放入就绪列表中 /* If the file is already "ready" we drop it inside the r