HRTIMER_MODE_REL = 0x1, /* Time value is relative to now */ HRTIMER_MODE_PINNED = 0x02, /* Timer is bound to CPU */ HRTIMER_MODE_ABS_PINNED = 0x02, HRTIMER_MODE_REL_PINNED = 0x03, }; Notes:hrtimer的SoC-->CPUs-->Clocks的层级关系,hrtimer_cpu_base-->hrtimer_clock_base。 和低...
HRTIMER_MODE_ABS_SOFT = HRTIMER_MODE_ABS | HRTIMER_MODE_SOFT, HRTIMER_MODE_REL_SOFT = HRTIMER_MODE_REL | HRTIMER_MODE_SOFT, HRTIMER_MODE_ABS_PINNED_SOFT = HRTIMER_MODE_ABS_PINNED | HRTIMER_MODE_SOFT, HRTIMER_MODE_REL_PINNED_SOFT = HRTIMER_MODE_REL_PINNED | HRTIMER_MODE_SOFT, HRTIMER_M...
HRTIMER_MODE_ABS_PINNED = 0x02, /* 第一种和第三种的结合 */ HRTIMER_MODE_REL_PINNED = 0x03, /* 第二种和第三种的结合 */ 启动定时器:hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode); 参数timer是hrtimer指针 参数tim是时间,可以使用ktime_set()函数设置时间...
HRTIMER_MODE_REL = 0x1, /* 相对模式 */ HRTIMER_MODE_PINNED = 0x02, /* 和CPU绑定 */ HRTIMER_MODE_ABS_PINNED = 0x02, /* 第一种和第三种的结合 */ HRTIMER_MODE_REL_PINNED = 0x03, /* 第二种和第三种的结合 */ */ void hrtimer_init(structhrtimer *timer,clockid_tclock_id,enumhrti...
HRTIMER_MODE_REL_PINNED = 0x03, /* 第二种和第三种的结合 */ */ void hrtimer_init(struct hrtimer *timer, clockid_t clock_id, enum hrtimer_mode mode); 3. 定时器启动 /* * 参数timer是hrtimer指针 * 参数tim是时间,可以使用ktime_set()函数设置时间, ...
HRTIMER_MODE_ABS_PINNED); /* Check, if the timer was already in the past */ if(hrtimer_active(&ts->sched_timer)) break; now = ktime_get(); } #ifdef CONFIG_NO_HZ if(tick_nohz_enabled) ts->nohz_mode = NOHZ_MODE_HIGHRES; ...
HRTIMER_MODE_ABS_PINNED); /* Check, if the timer was already in the past */ if (hrtimer_active(&ts->sched_timer)) break; now = ktime_get(); } #ifdef CONFIG_NO_HZ if (tick_nohz_enabled) ts->nohz_mode = NOHZ_MODE_HIGHRES; ...
HRTIMER_MODE_ABS_PINNED); /* Check, if the timer was already in the past */ if(hrtimer_active(&ts->sched_timer)) break; now = ktime_get(); } #ifdef CONFIG_NO_HZ if(tick_nohz_enabled) ts->nohz_mode = NOHZ_MODE_HIGHRES; ...
new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);if(mode & HRTIMER_MODE_REL) { tim = ktime_add_safe(tim, new_base->get_time());#ifdefCONFIG_TIME_LOW_REStim = ktime_add_safe(tim, base->resolution);#endif} ...
new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);if(mode & HRTIMER_MODE_REL) { tim = ktime_add_safe(tim, new_base->get_time());#ifdefCONFIG_TIME_LOW_REStim = ktime_add_safe(tim, base->resolution);#endif} ...