x86: use hlt instruction in panic()

pull/443/head
Marco Oliverio 2023-11-06 15:06:51 +00:00
parent fdcb83fe38
commit d89b44e0f1
1 changed files with 6 additions and 3 deletions

View File

@ -51,6 +51,11 @@
#define NULL 0
#endif
void hlt()
{
__asm__ ("hlt");
}
/**
* @brief Memory-mapped write access to a 32-bit register.
*
@ -265,9 +270,7 @@ void delay(int msec)
*/
void panic()
{
while (1) {
delay(1);
}
hlt();
}
/**