Move arch to seperate crate
This commit is contained in:
parent
3967c0f291
commit
2730144e2a
1 changed files with 156 additions and 101 deletions
19
arch/x86_64/src/interrupt.rs
Normal file
19
arch/x86_64/src/interrupt.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//! Interrupt instructions
|
||||
|
||||
/// Clear interrupts
|
||||
#[inline(always)]
|
||||
pub unsafe fn clear_interrupts() {
|
||||
asm!("cli" : : : : "intel", "volatile");
|
||||
}
|
||||
|
||||
/// Set interrupts
|
||||
#[inline(always)]
|
||||
pub unsafe fn set_interrupts() {
|
||||
asm!("sti" : : : : "intel", "volatile");
|
||||
}
|
||||
|
||||
/// Halt instruction
|
||||
#[inline(always)]
|
||||
pub unsafe fn halt() {
|
||||
asm!("hlt" : : : : "intel", "volatile");
|
||||
}
|
||||
Loading…
Reference in a new issue