a cleanup and a bugfix in the preemptive kernel:
authorIngo Molnar <mingo@elte.hu>
Tue, 12 Feb 2002 19:57:41 +0000 (20:57 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 12 Feb 2002 19:57:41 +0000 (20:57 +0100)
commit9bf40b149f86ab6784ac2ea26eb7717f38076955
tree3fe9bd786237fd749b2afdbfcf73dc09b182c392
parente496368cc6b91fd4fa6bc673f6a57a27047b96ab
a cleanup and a bugfix in the preemptive kernel:

- 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.
include/linux/sched.h
kernel/sched.c