Change proc state under held spinlock
This commit is contained in:
@ -125,7 +125,9 @@ int32_t SYSCALL1(sys_proc_run, pid1) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
spinlock_acquire(&PROCS.spinlock);
|
||||
proc->state = PROC_READY;
|
||||
spinlock_release(&PROCS.spinlock);
|
||||
|
||||
done:
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user