函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base, struct hrtimer_clock_base *base, struct hrtimer *timer, ktime_t *now, unsigned long flags)

返回类型:void

参数:

类型参数名称
struct hrtimer_cpu_base *cpu_base
struct hrtimer_clock_base *base
struct hrtimer *timer
ktime_t *now
unsigned longflags
1485  lockdep_assert_held( & lock)
1487  debug_deactivate(timer)
1488  running等于timer
1497  aw_write_seqcount_barrier - do a seq write barrier*@s: pointer to seqcount_t* This can be used to provide an ordering guarantee instead of the* usual consistency guarantee
1499  __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
1500  fn等于function
1507  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_TIME_LOW_RES)则is_rel = false
1515  raw_spin_unlock_irqrestore( & lock, flags)
1516  hrtimer_expire_entry - called immediately before the hrtimer callback*@hrtimer: pointer to struct hrtimer*@now: pointer to variable which contains current time of the* timers base.* Allows to determine the timer latency.
1517  restart等于fn(timer)
1518  hrtimer_expire_exit - called immediately after the hrtimer callback returns*@hrtimer: pointer to struct hrtimer* When used in combination with the hrtimer_expire_entry tracepoint we can* determine the runtime of the callback function.
1519  关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & lock)
1530  如果restart不等于Timer is not restarted 且非state按位与HRTIMER_STATE_ENQUEUED的值则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.
1541  aw_write_seqcount_barrier - do a seq write barrier*@s: pointer to seqcount_t* This can be used to provide an ordering guarantee instead of the* usual consistency guarantee
1543  WARN_ON_ONCE(running != timer)
1544  running = NULL
调用者
名称描述
__hrtimer_run_queues