Update sema_up to properly yield during execution of an interrupt handler
This commit is contained in:
@@ -120,6 +120,9 @@ sema_up (struct semaphore *sema)
|
||||
sema->value++;
|
||||
intr_set_level (old_level);
|
||||
|
||||
if (intr_context ())
|
||||
intr_yield_on_return ();
|
||||
else
|
||||
thread_yield ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user