函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\timer.c Create Date:2022-07-27 11:39:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:add_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.

函数原型:void add_timer_on(struct timer_list *timer, int cpu)

返回类型:void

参数:

类型参数名称
struct timer_list *timer
intcpu
1152  BUG_ON(mer_pending - is a timer pending?*@timer: the timer in question* timer_pending will tell whether a given timer is currently pending,* or not. Callers must ensure serialization wrt. other operations done* to this timer, eg || !function)
1154  new_base等于get_timer_cpu_base(flags, cpu)
1161  base等于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
1162  如果base不等于new_base
1163  flags或等于TIMER_MIGRATING
1165  raw_spin_unlock( & lock)
1166  base等于new_base
1167  raw_spin_lock( & lock)
1168  WRITE_ONCE(flags, (flags & ~TIMER_BASEMASK) | cpu)
1171  forward_timer_base(base)
1173  debug_timer_activate(timer)
1174  internal_add_timer(base, timer)
1175  raw_spin_unlock_irqrestore( & lock, flags)
调用者
名称描述
uv_heartbeat_enable
__queue_delayed_work