Fix checking if cpu->proc_current != NULL
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m37s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m37s
This commit is contained in:
@@ -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 ();
|
||||
|
||||
Reference in New Issue
Block a user