aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-03-10 16:01:26 +0100
committerNatasha Moongrave <natasha@256phi.eu>2026-03-10 16:01:26 +0100
commite722a692daa7e734f425dd3e92d85c1c5b3b9eea (patch)
tree210b04a7f6b20bad9c2ff9a5fd66f8d503adc97a
parent6113a03b8eec5b36e02ea5b28ab2c0e7d2a842f2 (diff)
replace the loop{} in pani() and _start() to keep the machine running with the xustom hlt_loop to allow for better power efficiency and not need to amx out the CPU to hog cycles in src/lib.rs
-rw-r--r--StrixKernel/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/StrixKernel/src/lib.rs b/StrixKernel/src/lib.rs
index c2cf804..311c408 100644
--- a/StrixKernel/src/lib.rs
+++ b/StrixKernel/src/lib.rs
@@ -54,7 +54,7 @@ pub fn test_panic_handler(info: &PanicInfo) -> ! {
serial_println!("[failed]\n");
serial_println!("Error: {}\n", info);
exit_qemu(QemuExitCode::Failed);
- loop {}
+ hlt_loop();
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -79,7 +79,7 @@ pub fn exit_qemu(exit_code: QemuExitCode) {
pub extern "C" fn _start() -> ! {
init();
test_main();
- loop {}
+ hlt_loop();
}
#[cfg(test)]