函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ep_rbtree_insert

函数原型:static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi)

返回类型:void

参数:

类型参数名称
struct eventpoll *ep
struct epitem *epi
1320  struct rb_node * * p = & rb_node, * parent = NULL
1322  bool leftmost = true
1324 p循环
1325  parent等于p
1326  epic等于rb_entry(parent, structepitem, rbn)
1327  kcmp等于Compare RB tree keys
1328  如果kcmp大于0则
1329  p等于rb_right
1330  leftmost = false
1331  否则p等于rb_left
1334  rb_link_node( & RB tree node links this structure to the eventpoll RB tree , parent, p)
1335  rb_insert_color_cached( & RB tree node links this structure to the eventpoll RB tree , & RB tree root used to store monitored fd structs , leftmost)
调用者
名称描述
ep_insertMust be called with "mtx" held.