Linux下epoll编程的问题
epoll_wait(int epfd, struct epoll_event * events, int maxevents, int timeout);参数events用来从内核得到事件的集合,maxevents告之内核这个events有多大,,这个maxevents的值不能大于创建epoll_create()时的size,
那么,如果当前触发的事件数,大于maxevents数,内核会怎么处理?
比如,当前发生了突发情况,有1万个连接连了过来,而maxevents设置的最大为1000 下次epoll_wait的时候再给你 回复 2# hellioncu
能告知一下内核源码是在哪儿实现的吗?
contestjia 发表于 2015-09-17 10:05 static/image/common/back.gif
回复 2# hellioncu
能告知一下内核源码是在哪儿实现的吗?
不知道,我没看过 回复 4# hellioncu
哦,谢谢 查找内核源码sys_epoll 或者CALL(sys_epoll_create1)
/* 250 */ CALL(sys_epoll_create)
CALL(ABI(sys_epoll_ctl, sys_oabi_epoll_ctl))
CALL(ABI(sys_epoll_wait, sys_oabi_epoll_wait))
下面是open的内核系统调用函数
SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode)
可以搜索SYSCALL_DEFINE
fs/eventpoll.c
页:
[1]