*参照元 [#e79c5ecb]
#backlinks

*説明 [#e11d9040]
-パス: [[linux-4.4.1/fs/select.c]]

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


**引数 [#ac14862f]
-struct poll_wqueues *pwq
--
--[[linux-4.4.1/poll_wqueues]]
-int state
--
-ktime_t *expires
--
--[[linux-4.4.1/ktime_t]]
-unsigned long slack
--


**返り値 [#ee448218]
-int
--


**参考 [#i606a6a7]


*実装 [#u75a85c0]
 int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
 			  ktime_t *expires, unsigned long slack)
 {
 	int rc = -EINTR;
 
 	set_current_state(state);
 	if (!pwq->triggered)
 		rc = schedule_hrtimeout_range(expires, slack, HRTIMER_MODE_ABS);
 	__set_current_state(TASK_RUNNING);
 
-
--[[linux-4.4.1/set_current_state()]]
--[[linux-4.4.1/schedule_hrtimeout_range()]]
--[[linux-4.4.1/__set_current_state()]]

 	/*
 	 * Prepare for the next iteration.
 	 *
 	 * The following smp_store_mb() serves two purposes.  First, it's
 	 * the counterpart rmb of the wmb in pollwake() such that data
 	 * written before wake up is always visible after wake up.
 	 * Second, the full barrier guarantees that triggered clearing
 	 * doesn't pass event check of the next iteration.  Note that
 	 * this problem doesn't exist for the first iteration as
 	 * add_wait_queue() has full barrier semantics.
 	 */
 	smp_store_mb(pwq->triggered, 0);
 
-
--[[linux-4.4.1/smp_store_mb()]]

 	return rc;
 }


*コメント [#y27be3a4]


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