user_space #4
@ -132,11 +132,11 @@ struct cpu_state *threadSwitch(struct cpu_state *prevCpu)
|
||||
disable_IRQs(flags);
|
||||
|
||||
nextThread = threadSelectNext();
|
||||
currentThread->cpuState = prevCpu;
|
||||
if (nextThread != currentThread) {
|
||||
currentThread->cpuState = prevCpu;
|
||||
currentThread->state = READY;
|
||||
currentThread = nextThread;
|
||||
currentThread->state = RUNNING;
|
||||
currentThread->state = READY;
|
||||
currentThread = nextThread;
|
||||
currentThread->state = RUNNING;
|
||||
threadPrepareContext(nextThread);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user