Skip to content

Commit

Permalink
Merge pull request #363 from rust-osdev/macro
Browse files Browse the repository at this point in the history
Remove software_interrupt! macro
  • Loading branch information
josephlr authored Mar 28, 2022
2 parents c739493 + cfd24c7 commit d8edd3f
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/instructions/interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,6 @@ pub fn int3() {
}
}

/// Generate a software interrupt by invoking the `int` instruction.
///
/// This currently needs to be a macro because the `int` argument needs to be an
/// immediate. This macro will be replaced by a generic function when support for
/// const generics is implemented in Rust.
#[macro_export]
macro_rules! software_interrupt {
($x:expr) => {{
asm!("int {id}", id = const $x, options(nomem, nostack));
}};
}

/// Generate a software interrupt by invoking the `int` instruction.
///
/// ## Safety
Expand Down

0 comments on commit d8edd3f

Please sign in to comment.