linux-2.6.33/prepare_to_wait()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#z72e185d]
#backlinks
*説明 [#wc4287ff]
-パス: [[linux-2.6.33/kernel/wait.c]]
-FIXME: これは何?
--説明
**引数 [#jc0d7765]
-wait_queue_head_t *q
--
--[[linux-2.6.33/wait_queue_head_t]]
-wait_queue_t *wait
--
--[[linux-2.6.33/wait_queue_t]]
-int state
--
**返り値 [#le6c5978]
-なし
**参考 [#j9ab45fb]
*実装 [#r2b6e78a]
/*
* Note: we use "set_current_state()" _after_ the wait-q...
* because we need a memory barrier there on SMP, so tha...
* wake-function that tests for the wait-queue being act...
* will be guaranteed to see waitqueue addition _or_ sub...
* tests in this thread will see the wakeup having taken...
*
* The spin_unlock() itself is semi-permeable and only p...
* one way (it only protects stuff inside the critical r...
* stops them from bleeding out - it would still allow s...
* loads to move into the critical region).
*/
void
prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait...
{
unsigned long flags;
wait->flags &= ~WQ_FLAG_EXCLUSIVE;
-
--[[linux-2.6.33/WQ_FLAG_EXCLUSIVE]]
spin_lock_irqsave(&q->lock, flags);
-
--[[linux-2.6.33/spin_lock_irqsave()]]
if (list_empty(&wait->task_list))
__add_wait_queue(q, wait);
-
--[[linux-2.6.33/list_empty()]]
--[[linux-2.6.33/__add_wait_queue()]]
set_current_state(state);
-
--[[linux-2.6.33/set_current_state()]]
spin_unlock_irqrestore(&q->lock, flags);
-
--[[linux-2.6.33/spin_unlock_irqrestore()]]
}
EXPORT_SYMBOL(prepare_to_wait);
-ライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#t0e873f3]
終了行:
*参照元 [#z72e185d]
#backlinks
*説明 [#wc4287ff]
-パス: [[linux-2.6.33/kernel/wait.c]]
-FIXME: これは何?
--説明
**引数 [#jc0d7765]
-wait_queue_head_t *q
--
--[[linux-2.6.33/wait_queue_head_t]]
-wait_queue_t *wait
--
--[[linux-2.6.33/wait_queue_t]]
-int state
--
**返り値 [#le6c5978]
-なし
**参考 [#j9ab45fb]
*実装 [#r2b6e78a]
/*
* Note: we use "set_current_state()" _after_ the wait-q...
* because we need a memory barrier there on SMP, so tha...
* wake-function that tests for the wait-queue being act...
* will be guaranteed to see waitqueue addition _or_ sub...
* tests in this thread will see the wakeup having taken...
*
* The spin_unlock() itself is semi-permeable and only p...
* one way (it only protects stuff inside the critical r...
* stops them from bleeding out - it would still allow s...
* loads to move into the critical region).
*/
void
prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait...
{
unsigned long flags;
wait->flags &= ~WQ_FLAG_EXCLUSIVE;
-
--[[linux-2.6.33/WQ_FLAG_EXCLUSIVE]]
spin_lock_irqsave(&q->lock, flags);
-
--[[linux-2.6.33/spin_lock_irqsave()]]
if (list_empty(&wait->task_list))
__add_wait_queue(q, wait);
-
--[[linux-2.6.33/list_empty()]]
--[[linux-2.6.33/__add_wait_queue()]]
set_current_state(state);
-
--[[linux-2.6.33/set_current_state()]]
spin_unlock_irqrestore(&q->lock, flags);
-
--[[linux-2.6.33/spin_unlock_irqrestore()]]
}
EXPORT_SYMBOL(prepare_to_wait);
-ライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#t0e873f3]
ページ名: