Reputation: 31
I was going over through the main scheduling function: __schedule()
and found a code snippet which is:
if (!preempt && prev->state) {
if (unlikely(signal_pending_state(prev->state, prev))) {
prev->state = TASK_RUNNING;
...
Now, if a process voluntarily preempts itself by keeping itself onto the wait queue, why does the state of the process change again to TASK_RUNNING
?
Upvotes: 0
Views: 225