Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\hrtimer.c Create Date:2022-07-28 10:40:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:queue_hrtimer - internal function to (re)start a timer* The timer is inserted in expiry order. Insertion into the* red black tree is O(log(n)). Must hold the base lock.* Returns 1 when the new timer is the leftmost timer in the tree.

Proto:static int enqueue_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, enum hrtimer_mode mode)

Type:int

Parameter:

TypeParameterName
struct hrtimer *timer
struct hrtimer_clock_base *base
enum hrtimer_modemode
965  debug_activate(timer, mode)
967  active_bases |= 1 << index
970  WRITE_ONCE(state, HRTIMER_STATE_ENQUEUED)
972  Return 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.
Caller
NameDescribe
__hrtimer_start_range_ns
__run_hrtimerThe write_seqcount_barrier()s in __run_hrtimer() split the thing into 3* distinct sections:* - queued: the timer is queued* - callback: the timer is being ran* - post: the timer is inactive or (re)queued* On the read side we ensure we observe timer->state