Update sema_up to properly yield during execution of an interrupt handler

This commit is contained in:
Themis
2024-10-17 20:01:39 +01:00
parent bfdedc53e2
commit 6b9b671368

View File

@@ -120,7 +120,10 @@ sema_up (struct semaphore *sema)
sema->value++;
intr_set_level (old_level);
thread_yield ();
if (intr_context ())
intr_yield_on_return ();
else
thread_yield ();
}
static void sema_test_helper (void *sema_);