aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 12d291bf3379..e82c99f1db64 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4028,6 +4028,8 @@ static inline void __cond_resched(void)
4028 */ 4028 */
4029 if (unlikely(preempt_count())) 4029 if (unlikely(preempt_count()))
4030 return; 4030 return;
4031 if (unlikely(system_state != SYSTEM_RUNNING))
4032 return;
4031 do { 4033 do {
4032 add_preempt_count(PREEMPT_ACTIVE); 4034 add_preempt_count(PREEMPT_ACTIVE);
4033 schedule(); 4035 schedule();
@@ -4333,6 +4335,7 @@ void __devinit init_idle(task_t *idle, int cpu)
4333 runqueue_t *rq = cpu_rq(cpu); 4335 runqueue_t *rq = cpu_rq(cpu);
4334 unsigned long flags; 4336 unsigned long flags;
4335 4337
4338 idle->timestamp = sched_clock();
4336 idle->sleep_avg = 0; 4339 idle->sleep_avg = 0;
4337 idle->array = NULL; 4340 idle->array = NULL;
4338 idle->prio = MAX_PRIO; 4341 idle->prio = MAX_PRIO;