user_space #4

Merged
mathieu merged 40 commits from user_space into master 2021-11-04 16:17:36 +01:00
1 changed files with 4 additions and 4 deletions
Showing only changes of commit e94f87b798 - Show all commits

View File

@ -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);
}