函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\eventpoll.c Create Date:2022-07-29 10:50:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Search the file inside the eventpoll tree. The RB tree operations* are protected by the "mtx" mutex, and ep_find() must be called with* "mtx" held.

函数原型:static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd)

返回类型:struct epitem

参数:

类型参数名称
struct eventpoll *ep
struct file *file
intfd
1031  struct epitem * epi, * epir = NULL
1034  Setup the structure that is used as key for the RB tree
1035 rbp循环
1036  epi等于rb_entry(rbp, structepitem, rbn)
1037  kcmp等于Compare RB tree keys
1038  如果kcmp大于0则rbp等于rb_right
1040  否则如果kcmp小于0则rbp等于rb_left
1042  否则
1043  epir等于epi
1044  退出
1048  返回:epir
调用者
名称描述
SYSCALL_DEFINE4The following function implements the controller interface for* the eventpoll file that enables the insertion/removal/change of* file descriptors inside the interest set.