Change proc state under held spinlock
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user