From 8ddab81a22d46a87efc63b5afd0b77f071c023a7 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 14 Jul 2020 17:46:01 -0400 Subject: [PATCH] chore: revert soft int location --- runtime/src/local_runqueue_minheap.c | 6 ++++-- runtime/src/software_interrupt.c | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/src/local_runqueue_minheap.c b/runtime/src/local_runqueue_minheap.c index 10b0bc6..045bb3f 100644 --- a/runtime/src/local_runqueue_minheap.c +++ b/runtime/src/local_runqueue_minheap.c @@ -119,8 +119,10 @@ err: void local_runqueue_minheap_preempt(ucontext_t *user_context) { - /* Assumption: Software Interrupts are disabed by caller */ - assert(!software_interrupt_is_enabled()); + assert(user_context != NULL); + + /* Prevent nested preemption */ + software_interrupt_disable(); struct sandbox *current_sandbox = current_sandbox_get(); diff --git a/runtime/src/software_interrupt.c b/runtime/src/software_interrupt.c index 01baabf..fc4c249 100644 --- a/runtime/src/software_interrupt.c +++ b/runtime/src/software_interrupt.c @@ -111,7 +111,6 @@ software_interrupt_handle_signals(int signal_type, siginfo_t *signal_info, void if (current_sandbox->state == SANDBOX_RETURNED) return; /* Preempt */ - software_interrupt_disable(); local_runqueue_preempt(user_context); return;