Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kernel/src/arch/x86_64/interrupt_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,17 @@ extern "x86-interrupt" fn preemption(_stack_frame: InterruptStackFrame) {
#[cfg(feature = "perf")]
let prev = awkernel_async_lib::task::perf::start_interrupt();

// End of interrupt. It must come before the return below, because an
// in-service preemption vector blocks every later interrupt.
awkernel_lib::interrupt::eoi();

#[cfg(not(feature = "perf"))]
{
if awkernel_async_lib::task::get_current_task(cpu_id()).is_none() {
return;
}
}

awkernel_lib::interrupt::eoi(); // End of interrupt.
awkernel_lib::interrupt::handle_preemption();

#[cfg(feature = "perf")]
Expand Down
Loading