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

@ -239,7 +239,9 @@ void proc_sched(void *cpustate) {
}
void proc_kill(Proc *proc) {
spinlock_acquire(&PROCS.spinlock);
proc->state = PROC_ZOMBIE;
spinlock_release(&PROCS.spinlock);
}
void proc_killself(void) {