diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp index e4c94735de..d1e7c69def 100644 --- a/Kernel/Arch/x86/common/Processor.cpp +++ b/Kernel/Arch/x86/common/Processor.cpp @@ -616,6 +616,10 @@ void Processor::exit_trap(TrapFrame& trap) if (s_smp_enabled) smp_process_pending_messages(); + // Process the deferred call queue. Among other things, this ensures + // that any pending thread unblocks happen before we enter the scheduler. + deferred_call_execute_pending(); + auto* current_thread = Processor::current_thread(); if (current_thread) { auto& current_trap = current_thread->current_trap();