mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Move hlt_loop up to keep cfg(test) functions together
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@@ -50,6 +50,12 @@ pub fn exit_qemu(exit_code: QemuExitCode) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn hlt_loop() -> ! {
|
||||
loop {
|
||||
x86_64::instructions::hlt();
|
||||
}
|
||||
}
|
||||
|
||||
/// Entry point for `cargo xtest`
|
||||
#[cfg(test)]
|
||||
#[no_mangle]
|
||||
@@ -64,9 +70,3 @@ pub extern "C" fn _start() -> ! {
|
||||
fn panic(info: &PanicInfo) -> ! {
|
||||
test_panic_handler(info)
|
||||
}
|
||||
|
||||
pub fn hlt_loop() -> ! {
|
||||
loop {
|
||||
x86_64::instructions::hlt();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user