Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\eventpoll.c Create Date:2022-07-28 20:19:07
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd)

Type:struct epitem

Parameter:

TypeParameterName
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  When rbp cycle
1036  epi = rb_entry(rbp, structepitem, rbn)
1037  kcmp = Compare RB tree keys
1038  If kcmp > 0 Then rbp = rb_right
1040  Else if kcmp < 0 Then rbp = rb_left
1042  Else
1043  epir = epi
1044  Break
1048  Return epir
Caller
NameDescribe
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.