Fix checking if cpu->proc_current != NULL
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m37s

This commit is contained in:
2026-03-02 00:12:08 +01:00
parent 9043c4f9ec
commit 68f6aef215
4 changed files with 17 additions and 48 deletions

View File

@@ -190,12 +190,15 @@ void intr_handler (void* stack_ptr) {
intr_exception (regs);
} else {
spin_lock (&thiscpu->lock);
struct proc* proc_current = thiscpu->proc_current;
spin_lock (&proc_current->lock);
memcpy (&proc_current->pdata.regs, regs, sizeof (struct saved_regs));
if (proc_current != NULL) {
spin_lock (&proc_current->lock);
memcpy (&proc_current->pdata.regs, regs, sizeof (struct saved_regs));
spin_unlock (&proc_current->lock);
}
spin_unlock (&proc_current->lock);
spin_unlock (&thiscpu->lock);
lapic_eoi ();