Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:We are using hashed locking: Holding per_cpu(timer_bases[x]).lock means* that all timers which are tied to this base are locked, and the base itself* is locked too.* So __run_timers/migrate_timers can safely modify all timers which could

Proto:static struct timer_base *lock_timer_base(struct timer_list *timer, unsigned long *flags)__acquires(timer->base->lock)

Type:struct timer_base

Parameter:

TypeParameterName
struct timer_list *timer
unsigned long *flags
923  cycle
932  tf = READ_ONCE(flags)
934  If Not (tf & TIMER_MIGRATING) Then
937  If flags == tf Then Return base
941  cpu_relax()
Caller
NameDescribe
__mod_timer
add_timer_onadd_timer_on - start a timer on a particular CPU*@timer: the timer to be added*@cpu: the CPU to start it on* This is not very scalable on SMP. Double adds are not possible.
del_timerdel_timer - deactivate a timer.*@timer: the timer to be deactivated* del_timer() deactivates a timer - this works on both active and inactive* timers.* The function returns whether it has deactivated a pending timer or not.* (ie
try_to_del_timer_syncry_to_del_timer_sync - Try to deactivate a timer*@timer: timer to delete* This function tries to deactivate a timer. Upon successful (ret >= 0)* exit the timer is not queued and the handler is not running on any CPU.