函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:p_loop_check_proc - Callback function to be passed to the @ep_call_nested()* API, to verify that adding an epoll file inside another* epoll structure, does not violate the constraints, in* terms of closed loops, or too deep chains (which can

函数原型:static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)

返回类型:int

参数:

类型参数名称
void *priv
void *cookie
intcall_nests
1938  error等于0
1939  file等于priv
1940  ep等于 needed for tty driver, and maybe others
1945  mutex_lock_nested( & * This mutex is used to ensure that files are not removed * while epoll is using them. This is held during the event * collection loop, the file cleanup path, the epoll file exit * code and the ctl operations., call_nests + 1)
1946  used to optimize loop detection check 等于1
1947  添加链表项
1948 rbp循环
1949  epi等于rb_entry(rbp, structepitem, rbn)
1952  如果 used to optimize loop detection check 则继续下一循环
1957  如果error不等于0则退出
1959  否则
1968  如果链表为空添加链表项
1973  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1975  返回:error