• Ingo Molnar's avatar
    a cleanup and a bugfix in the preemptive kernel: · 9bf40b14
    Ingo Molnar authored
    - the PREEMPT_ACTIVE trick is not needed
    
    - schedule() should check for need_resched, we might miss a
      reschedule otherwise.
    
    the cleanup also fixes the bug. The only reason why i kept
    preempt_schedule() was to fix up p->state to TASK_RUNNING,
    to make it possible to preempt from places that mark the
    task TASK_UNINTERRUPTIBLE before adding the task to a waitqueue,
    and thus a preemption in that small window could cause the
    task to be removed from the runqueue erroneously.
    9bf40b14
sched.c 36.1 KB