Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__hrtimer_init

Proto:static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, enum hrtimer_mode mode)

Type:void

Parameter:

TypeParameterName
struct hrtimer *timer
clockid_tclock_id
enum hrtimer_modemode
1379  softtimer = Not Not (mode & Timer callback function will be executed in)
1389  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_PREEMPT_RT) && Not (mode & Timer callback function will be executed in) Then 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  If clock_id == The IDs of the various system clocks (for POSIX.1b interval timers): && mode & Time value is relative to now Then clock_id = CLOCK_MONOTONIC
1404  base = If softtimer Then HRTIMER_MAX_CLOCK_BASES / 2 Else 0
1405  base += hrtimer_clockid_to_base(clock_id)
1406  is_soft = softtimer
1407  is_hard = Not softtimer
1408  base = clock_base[base]
1409  timerqueue_init( & node)
Caller
NameDescribe
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