*参照元 [#d6847de9]
#backlinks

*説明 [#sb302583]
-パス: [[linux-2.6.33/]]
-パス: [[linux-2.6.33/kenel/wait.c]]

-FIXME: これは何?
--説明


**引数 [#se5022f7]
-wait_queue_head_t *q
--
--[[linux-2.6.33/wait_queue_head_t]]
-wait_queue_t *wait
--
--[[linux-2.6.33/wait_queue_t]]


**返り値 [#ee41c27f]
-なし


**参考 [#s31a327a]


*実装 [#sf8f6723]
 /*
  * finish_wait - clean up after waiting in a queue
  * @q: waitqueue waited on
  * @wait: wait descriptor
  *
  * Sets current thread back to running state and removes
  * the wait descriptor from the given waitqueue if still
  * queued.
  */
 void finish_wait(wait_queue_head_t *q, wait_queue_t *wait)
 {
 	unsigned long flags;
 
 	__set_current_state(TASK_RUNNING);
-
--[[linux-2.6.33/__set_current_state()]]

 	/*
 	 * We can check for list emptiness outside the lock
 	 * IFF:
 	 *  - we use the "careful" check that verifies both
 	 *    the next and prev pointers, so that there cannot
 	 *    be any half-pending updates in progress on other
 	 *    CPU's that we haven't seen yet (and that might
 	 *    still change the stack area.
 	 * and
 	 *  - all other users take the lock (ie we can only
 	 *    have _one_ other CPU that looks at or modifies
 	 *    the list).
 	 */
 	if (!list_empty_careful(&wait->task_list)) {
-
--[[linux-2.6.33/list_empty_careful()]]

 		spin_lock_irqsave(&q->lock, flags);
 		list_del_init(&wait->task_list);
 		spin_unlock_irqrestore(&q->lock, flags);
-
--[[linux-2.6.33/spin_lock_irqsave()]]
--[[linux-2.6.33/list_del_init()]]
--[[linux-2.6.33/spin_unlock_irqrestore()]]

 	}
 }
 EXPORT_SYMBOL(finish_wait);
-ライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]


*コメント [#t6e6d21b]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS