Change proc state under held spinlock

This commit is contained in:
2025-11-08 21:40:15 +01:00
parent e0162e9e0b
commit e4a5c07b3d
2 changed files with 4 additions and 0 deletions

View File

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