Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\timerqueue.c Create Date:2022-07-28 06:13:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:merqueue_add - Adds timer to timerqueue.*@head: head of timerqueue*@node: timer node to be added* Adds the timer node to the timerqueue, sorted by the node's expires* value. Returns true if the newly added timer is the first expiring timer in* the queue.

Proto:bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node)

Type:bool

Parameter:

TypeParameterName
struct timerqueue_head *head
struct timerqueue_node *node
29  p = rb_node
30  struct rb_node * parent = NULL
32  bool leftmost = true
35  WARN_ON_ONCE(!'empty' nodes are nodes that are known not to be inserted in an rbtree ( & node))
37  When p cycle
38  parent = p
39  ptr = rb_entry(parent, structtimerqueue_node, node)
40  If expires < expires Then
41  p = rb_left
42  Else
43  p = rb_right
44  leftmost = false
47  rb_link_node( & node, parent, p)
48  rb_insert_color_cached( & node, & rb_root, leftmost)
50  Return leftmost
Caller
NameDescribe
alarmtimer_enqueuealarmtimer_enqueue - Adds an alarm timer to an alarm_base timerqueue*@base: pointer to the base where the timer is being run*@alarm: pointer to alarm being enqueued.* Adds alarm to a alarm_base timerqueue* Must hold base->lock when calling.