mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[panic] Don't spin the CPU in panic
While waiting for the main panicing CPU to finish, don't spin the CPU
without using `asm("pause")` to lower power consumption. Some panics can
get stuck in this state and oh man do my fans spin up.
This commit is contained in:
@@ -30,7 +30,7 @@ void panic_handler(const cpu_state *regs)
|
||||
// If we're not running on the CPU that panicked, wait
|
||||
// for it to finish
|
||||
if (!panic) {
|
||||
while (!main_cpu_done);
|
||||
while (!main_cpu_done) asm ("pause");
|
||||
} else {
|
||||
new (&com1) panicking::serial_port {panicking::COM1};
|
||||
new (&syms) panicking::symbol_table {panic->symbol_data};
|
||||
|
||||
Reference in New Issue
Block a user