Skip to content

Commit 6ba1dd6

Browse files
author
Tom Dohrmann
committed
put set_general_handler behind feature gate
1 parent 43233b6 commit 6ba1dd6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/structures/idt.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,7 @@ pub enum ExceptionVector {
11231123
Security = 0x1E,
11241124
}
11251125

1126+
#[cfg(all(feature = "instructions", feature = "abi_x86_interrupt"))]
11261127
#[macro_export]
11271128
/// Set a general handler in an [`InterruptDescriptorTable`].
11281129
/// ```
@@ -1175,6 +1176,7 @@ macro_rules! set_general_handler {
11751176
}};
11761177
}
11771178

1179+
#[cfg(all(feature = "instructions", feature = "abi_x86_interrupt"))]
11781180
#[macro_export]
11791181
#[doc(hidden)]
11801182
/// We can't loop in macros, but we can use recursion.
@@ -1196,6 +1198,7 @@ macro_rules! set_general_handler_recursive_bits {
11961198
};
11971199
}
11981200

1201+
#[cfg(all(feature = "instructions", feature = "abi_x86_interrupt"))]
11991202
#[macro_export]
12001203
#[doc(hidden)]
12011204
macro_rules! set_general_handler_entry {
@@ -1337,6 +1340,7 @@ mod test {
13371340
assert_eq!(size_of::<InterruptDescriptorTable>(), 256 * 16);
13381341
}
13391342

1343+
#[cfg(all(feature = "instructions", feature = "abi_x86_interrupt"))]
13401344
#[test]
13411345
fn default_handlers() {
13421346
fn general_handler(

0 commit comments

Comments
 (0)