user_space #4

Merged
mathieu merged 40 commits from user_space into master 2021-11-04 16:17:36 +01:00
Showing only changes of commit e94f87b798 - Show all commits

View File

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