函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__hrtimer_init

函数原型:static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, enum hrtimer_mode mode)

返回类型:void

参数:

类型参数名称
struct hrtimer *timer
clockid_tclock_id
enum hrtimer_modemode
1379  softtimer等于非非mode按位与 Timer callback function will be executed in的值
1389  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_PREEMPT_RT)且非mode按位与 Timer callback function will be executed in的值则softtimer = true
1392  memset(timer, 0, sizeof(structhrtimer))
1394  cpu_base等于raw_cpu_ptr( & The timer bases:* There are more clockids than hrtimer bases. Thus, we index* into the timer bases by the hrtimer_base_type enum. When trying* to reach a base using a clockid, hrtimer_clockid_to_base())
1401  如果clock_id恒等于The IDs of the various system clocks (for POSIX.1b interval timers):mode按位与 Time value is relative to nowclock_id等于CLOCK_MONOTONIC
1404  base等于如果softtimerHRTIMER_MAX_CLOCK_BASES除2否则0
1405  base加等于hrtimer_clockid_to_base(clock_id)
1406  is_soft等于softtimer
1407  is_hard等于非softtimer
1408  base等于clock_base[base]
1409  timerqueue_init( & node)
调用者
名称描述
hrtimer_inithrtimer_init - initialize a timer to the given clock*@timer: the timer to be initialized*@clock_id: the clock to be used*@mode: The modes which are relevant for intitialization:* HRTIMER_MODE_ABS, HRTIMER_MODE_REL, HRTIMER_MODE_ABS_SOFT,*
__hrtimer_init_sleeper