linux-4.4.1/hrtimer_try_to_cancel()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#w214a055]
#backlinks
*説明 [#b93ca59b]
-パス: [[linux-4.4.1/kernel/time/hrtimer.c]]
-FIXME: これは何?
--説明
**引数 [#bbe94349]
-struct hrtimer *timer
--
--[[linux-4.4.1/htrimer]]
**返り値 [#de416353]
-int
--
**参考 [#o5441097]
*実装 [#l1772ca7]
/**
* hrtimer_try_to_cancel - try to deactivate a timer
* @timer: hrtimer to stop
*
* Returns:
* 0 when the timer was not active
* 1 when the timer was active
* -1 when the timer is currently excuting the callback ...
* cannot be stopped
*/
int hrtimer_try_to_cancel(struct hrtimer *timer)
{
struct hrtimer_clock_base *base;
unsigned long flags;
int ret = -1;
-
--[[linux-4.4.1/hrtimer_clock_base]]
/*
* Check lockless first. If the timer is not act...
* enqueued nor running the callback, nothing to...
* base lock does not serialize against a concur...
* so we can avoid taking it.
*/
if (!hrtimer_active(timer))
return 0;
-
--[[linux-4.4.1/hrtimer_active()]]
base = lock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/lock_hrtimer_base()]]
if (!hrtimer_callback_running(timer))
ret = remove_hrtimer(timer, base, false);
-
--[[linux-4.4.1/hrtimer_callback_running()]]
--[[linux-4.4.1/remove_hrtimer()]]
unlock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/unlock_hrtimer_base()]]
return ret;
}
EXPORT_SYMBOL_GPL(hrtimer_try_to_cancel);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#nfb2b190]
終了行:
*参照元 [#w214a055]
#backlinks
*説明 [#b93ca59b]
-パス: [[linux-4.4.1/kernel/time/hrtimer.c]]
-FIXME: これは何?
--説明
**引数 [#bbe94349]
-struct hrtimer *timer
--
--[[linux-4.4.1/htrimer]]
**返り値 [#de416353]
-int
--
**参考 [#o5441097]
*実装 [#l1772ca7]
/**
* hrtimer_try_to_cancel - try to deactivate a timer
* @timer: hrtimer to stop
*
* Returns:
* 0 when the timer was not active
* 1 when the timer was active
* -1 when the timer is currently excuting the callback ...
* cannot be stopped
*/
int hrtimer_try_to_cancel(struct hrtimer *timer)
{
struct hrtimer_clock_base *base;
unsigned long flags;
int ret = -1;
-
--[[linux-4.4.1/hrtimer_clock_base]]
/*
* Check lockless first. If the timer is not act...
* enqueued nor running the callback, nothing to...
* base lock does not serialize against a concur...
* so we can avoid taking it.
*/
if (!hrtimer_active(timer))
return 0;
-
--[[linux-4.4.1/hrtimer_active()]]
base = lock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/lock_hrtimer_base()]]
if (!hrtimer_callback_running(timer))
ret = remove_hrtimer(timer, base, false);
-
--[[linux-4.4.1/hrtimer_callback_running()]]
--[[linux-4.4.1/remove_hrtimer()]]
unlock_hrtimer_base(timer, &flags);
-
--[[linux-4.4.1/unlock_hrtimer_base()]]
return ret;
}
EXPORT_SYMBOL_GPL(hrtimer_try_to_cancel);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#nfb2b190]
ページ名: