Fix threadSwitch
This commit is contained in:
parent
959bc56bc7
commit
e94f87b798
@ -132,11 +132,11 @@ struct cpu_state *threadSwitch(struct cpu_state *prevCpu)
|
|||||||
disable_IRQs(flags);
|
disable_IRQs(flags);
|
||||||
|
|
||||||
nextThread = threadSelectNext();
|
nextThread = threadSelectNext();
|
||||||
|
currentThread->cpuState = prevCpu;
|
||||||
if (nextThread != currentThread) {
|
if (nextThread != currentThread) {
|
||||||
currentThread->cpuState = prevCpu;
|
currentThread->state = READY;
|
||||||
currentThread->state = READY;
|
currentThread = nextThread;
|
||||||
currentThread = nextThread;
|
currentThread->state = RUNNING;
|
||||||
currentThread->state = RUNNING;
|
|
||||||
threadPrepareContext(nextThread);
|
threadPrepareContext(nextThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user