Don't check context if only thread-mode is enabled

This commit is contained in:
Dániel Buga 2023-08-14 16:46:02 +02:00
parent 07c3600127
commit e4f3979ec8

View File

@ -10,7 +10,8 @@ fn __pender(context: *mut ()) {
let context = context as usize; let context = context as usize;
#[cfg(feature = "executor-thread")] #[cfg(feature = "executor-thread")]
if context == THREAD_PENDER { // Try to make Rust optimize the branching away if we only use thread mode.
if !cfg!(feature = "executor-interrupt") || context == THREAD_PENDER {
core::arch::asm!("sev"); core::arch::asm!("sev");
return; return;
} }