Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__remove_hrtimer - internal function to remove a timer* Caller must hold the base lock.* High resolution timer mode reprograms the clock event device when the* timer is the one which expires next. The caller can disable this by setting* reprogram to zero

Proto:static void __remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, u8 newstate, int reprogram)

Type:void

Parameter:

TypeParameterName
struct hrtimer *timer
struct hrtimer_clock_base *base
u8newstate
intreprogram
989  cpu_base = cpu_base
990  state = state
993  WRITE_ONCE(state, newstate)
994  If Not (state & HRTIMER_STATE_ENQUEUED) Then Return
997  If Not merqueue_del - Removes a timer from the timerqueue.*@head: head of timerqueue*@node: timer node to be removed* Removes the timer node from the timerqueue. Returns true if the queue is* not empty after the remove. Then active_bases &= ~(1 << index)
1008  If reprogram && timer == next_timer Then Reprogram the event source with checking both queues for the* next event* Called with interrupts disabled and base->lock held
Caller
NameDescribe
remove_hrtimermove hrtimer, called with base lock held
__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