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:ep_rbtree_insert

Proto:static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi)

Type:void

Parameter:

TypeParameterName
struct eventpoll *ep
struct epitem *epi
1320  struct rb_node * * p = & rb_node, * parent = NULL
1322  bool leftmost = true
1324  When p cycle
1325  parent = p
1326  epic = rb_entry(parent, structepitem, rbn)
1327  kcmp = Compare RB tree keys
1328  If kcmp > 0 Then
1329  p = rb_right
1330  leftmost = false
1331  Else 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)
Caller
NameDescribe
ep_insertMust be called with "mtx" held.