Move hlt_loop up to keep cfg(test) functions together

This commit is contained in:
Philipp Oppermann
2019-04-26 11:59:16 +02:00
parent 51cdc4db8b
commit 8854b6b751

View File

@@ -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();
}
}