1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#![cfg(target_arch = "x86_64")]
pub mod interrupts;
pub mod port;
pub mod random;
pub mod segmentation;
pub mod tables;
pub mod tlb;
#[inline]
pub fn hlt() {
#[cfg(feature = "inline_asm")]
unsafe {
llvm_asm!("hlt" :::: "volatile");
}
#[cfg(not(feature = "inline_asm"))]
unsafe {
crate::asm::x86_64_asm_hlt();
}
}
#[cfg(feature = "inline_asm")]
#[inline]
pub fn bochs_breakpoint() {
unsafe {
llvm_asm!("xchgw %bx, %bx" :::: "volatile");
}
}