linux-4.4.1/hrtimer_start_range_ns()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#abf3d859]
#backlinks
*説明 [#v71519a8]
-パス: [[linux-4.4.1/kernel/time/hrtimer.c]]
-FIXME: これは何?
--説明
**引数 [#i618a3cb]
-struct hrtimer *timer
--
--[[linux-4.4.1/hrtimer]]
-ktime_t tim
--
--[[linux-4.4.1/ktime_t]]
-unsigned long delta_ns
--
-const enum hrtimer_mode mode
--
--[[linux-4.4.1/hrtimer_mode]]
**返り値 [#o01ac7f4]
-
--
**参考 [#r55b01cc]
*実装 [#a1352783]
/**
* hrtimer_start_range_ns - (re)start an hrtimer on the ...
* @timer: the timer to be added
* @tim: expiry time
* @delta_ns: "slack" range for the timer
* @mode: expiry mode: absolute (HRTIMER_MODE_ABS)...
* relative (HRTIMER_MODE_REL)
*/
void hrtimer_start_range_ns(struct hrtimer *timer, ktime...
unsigned long delta_ns, cons...
{
struct hrtimer_clock_base *base, *new_base;
unsigned long flags;
int leftmost;
-
--[[linux-4.4.1/hrtimer_clock_base]]
base = lock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/lock_hrtimer_base()]]
/* Remove an active timer from the queue: */
remove_hrtimer(timer, base, true);
-
--[[linux-4.4.1/remove_hrtimer()]]
if (mode & HRTIMER_MODE_REL) {
tim = ktime_add_safe(tim, base->get_time...
-
--[[linux-4.4.1/ktimer_add_safe()]]
/*
* CONFIG_TIME_LOW_RES is a temporary wa...
* to signal that they simply return xti...
* do_gettimeoffset(). In this case we w...
* resolution when starting a relative t...
* timeouts. This will go away with the ...
*/
#ifdef CONFIG_TIME_LOW_RES
tim = ktime_add_safe(tim, ktime_set(0, h...
#endif
-
--[[linux-4.4.1/CONFIG_TIME_LOW_RES]]
--[[linux-4.4.1/ktime_set()]]
--[[linux-4.4.1/hrtimer_resolution(global)]]
}
hrtimer_set_expires_range_ns(timer, tim, delta_n...
-
--[[linux-4.4.1/hrtimer_set_expires_range_ns()]]
/* Switch the timer base, if necessary: */
new_base = switch_hrtimer_base(timer, base, mode...
-
--[[linux-4.4.1/switch_hrtimer_base()]]
timer_stats_hrtimer_set_start_info(timer);
-
--[[linux-4.4.1/timer_stats_hrtimer_set_start_info()]]
leftmost = enqueue_hrtimer(timer, new_base);
if (!leftmost)
goto unlock;
-
--[[linux-4.4.1/enqueue_hrtimer()]]
if (!hrtimer_is_hres_active(timer)) {
-
--[[linux-4.4.1/hrtimer_is_hres_active()]]
/*
* Kick to reschedule the next tick to h...
* on dynticks target.
*/
if (new_base->cpu_base->nohz_active)
wake_up_nohz_cpu(new_base->cpu_b...
-
--[[linux-4.4.1/wake_up_nohz_cpu()]]
} else {
hrtimer_reprogram(timer, new_base);
-
--[[linux-4.4.1/hrtimer_reprogram()]]
}
unlock:
unlock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/unlock_hrtimer_base()]]
}
EXPORT_SYMBOL_GPL(hrtimer_start_range_ns);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#td97e93a]
終了行:
*参照元 [#abf3d859]
#backlinks
*説明 [#v71519a8]
-パス: [[linux-4.4.1/kernel/time/hrtimer.c]]
-FIXME: これは何?
--説明
**引数 [#i618a3cb]
-struct hrtimer *timer
--
--[[linux-4.4.1/hrtimer]]
-ktime_t tim
--
--[[linux-4.4.1/ktime_t]]
-unsigned long delta_ns
--
-const enum hrtimer_mode mode
--
--[[linux-4.4.1/hrtimer_mode]]
**返り値 [#o01ac7f4]
-
--
**参考 [#r55b01cc]
*実装 [#a1352783]
/**
* hrtimer_start_range_ns - (re)start an hrtimer on the ...
* @timer: the timer to be added
* @tim: expiry time
* @delta_ns: "slack" range for the timer
* @mode: expiry mode: absolute (HRTIMER_MODE_ABS)...
* relative (HRTIMER_MODE_REL)
*/
void hrtimer_start_range_ns(struct hrtimer *timer, ktime...
unsigned long delta_ns, cons...
{
struct hrtimer_clock_base *base, *new_base;
unsigned long flags;
int leftmost;
-
--[[linux-4.4.1/hrtimer_clock_base]]
base = lock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/lock_hrtimer_base()]]
/* Remove an active timer from the queue: */
remove_hrtimer(timer, base, true);
-
--[[linux-4.4.1/remove_hrtimer()]]
if (mode & HRTIMER_MODE_REL) {
tim = ktime_add_safe(tim, base->get_time...
-
--[[linux-4.4.1/ktimer_add_safe()]]
/*
* CONFIG_TIME_LOW_RES is a temporary wa...
* to signal that they simply return xti...
* do_gettimeoffset(). In this case we w...
* resolution when starting a relative t...
* timeouts. This will go away with the ...
*/
#ifdef CONFIG_TIME_LOW_RES
tim = ktime_add_safe(tim, ktime_set(0, h...
#endif
-
--[[linux-4.4.1/CONFIG_TIME_LOW_RES]]
--[[linux-4.4.1/ktime_set()]]
--[[linux-4.4.1/hrtimer_resolution(global)]]
}
hrtimer_set_expires_range_ns(timer, tim, delta_n...
-
--[[linux-4.4.1/hrtimer_set_expires_range_ns()]]
/* Switch the timer base, if necessary: */
new_base = switch_hrtimer_base(timer, base, mode...
-
--[[linux-4.4.1/switch_hrtimer_base()]]
timer_stats_hrtimer_set_start_info(timer);
-
--[[linux-4.4.1/timer_stats_hrtimer_set_start_info()]]
leftmost = enqueue_hrtimer(timer, new_base);
if (!leftmost)
goto unlock;
-
--[[linux-4.4.1/enqueue_hrtimer()]]
if (!hrtimer_is_hres_active(timer)) {
-
--[[linux-4.4.1/hrtimer_is_hres_active()]]
/*
* Kick to reschedule the next tick to h...
* on dynticks target.
*/
if (new_base->cpu_base->nohz_active)
wake_up_nohz_cpu(new_base->cpu_b...
-
--[[linux-4.4.1/wake_up_nohz_cpu()]]
} else {
hrtimer_reprogram(timer, new_base);
-
--[[linux-4.4.1/hrtimer_reprogram()]]
}
unlock:
unlock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/unlock_hrtimer_base()]]
}
EXPORT_SYMBOL_GPL(hrtimer_start_range_ns);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#td97e93a]
ページ名: