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