Use cfg!() instead of #[cfg] for most profiling code
This makes it less likely that it breaks again in the future as most code gets checked by the compiler even when profiling support is not enabled.
This commit is contained in:
@@ -50,10 +50,10 @@ interrupt_stack!(debug, @paranoid, |stack| {
|
||||
});
|
||||
|
||||
interrupt_stack!(non_maskable, @paranoid, |stack| {
|
||||
#[cfg(feature = "profiling")]
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
unsafe { crate::profiling::nmi_handler(stack) };
|
||||
|
||||
#[cfg(not(feature = "profiling"))]
|
||||
#[cfg(not(all(target_arch = "x86_64", feature = "profiling")))]
|
||||
{
|
||||
// TODO: This will likely deadlock
|
||||
println!("Non-maskable interrupt");
|
||||
|
||||
Reference in New Issue
Block a user