- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#vc13d7ef]
#backlinks
*説明 [#oabdaa3a]
-パス: [[linux-2.6.33/kernel/sched.c]]
-FIXME: これは何?
--説明
**引数 [#nd66bb7d]
-なし
**返り値 [#h1688944]
-なし
**参考 [#e4725b51]
*実装 [#w93312dc]
/*
* this is the entry point to schedule() from in-kernel preemption
* off of preempt_enable. Kernel preemptions off return from interrupt
* occur there and call schedule directly.
*/
asmlinkage void __sched preempt_schedule(void)
{
-
--[[linux-2.6.33/]]
struct thread_info *ti = current_thread_info();
-
--[[linux-2.6.33/]]
-
--[[linux-2.6.33/]]
/*
* If there is a non-zero preempt_count or interrupts are disabled,
* we do not want to preempt the current task. Just return..
*/
if (likely(ti->preempt_count || irqs_disabled()))
return;
-
--[[linux-2.6.33/likely()]]
-
--[[linux-2.6.33/irqs_disabled()]]
do {
add_preempt_count(PREEMPT_ACTIVE);
schedule();
sub_preempt_count(PREEMPT_ACTIVE);
-
--[[linux-2.6.33/add_preempt_count()]]
-
--[[linux-2.6.33/schedule()]]
-
--[[linux-2.6.33/sub_preempt_count()]]
/*
* Check again in case we missed a preemption opportunity
* between schedule and now.
*/
barrier();
-メモリバリア
--FIXME: スケジュールを要求するフラグに変化があった場合、
変更を確実に得るため?
--[[linux-2.6.33/barrier()]]
} while (need_resched());
-
--[[linux-2.6.33/need_resched()]]
}
EXPORT_SYMBOL(preempt_schedule);
-特にライセンスを区別せずにシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#r256364f]