Interrupt occurs, puts this task in state TASK_RUNNING.
> current->state = saved_state;
whoops. We went back into TASK_UNINTERRUPTIBLE.
> }
>
We could fix this with changes to schedule(), but that's
not nice. Another approach would be:
preempt_schedule()
{
current->state2 = current->state;
current->state = TASK_RUNNING;
schedule();
current->state = current->state2;
}
and wake_up() would do:
tsk->state = TASK_RUNNING;
tsk->state2 = TASK_RUNNING;
With the appropriate locking, memory barriers and other
relevant goo I think this would work...
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/