API epoll提供给用户进程的接口有如下四个,本文基于linux-5.1.4源码详细分析每个API具体做了啥工作,通过UML时序图理清内核内部的函数调用关系. int epoll_create1(int size): 创建一个epfd句柄,size为0时等价于int epoll_create(0). int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event): 向epfd上添加/修改/删除fd. int epoll_w…