[panic] HLT on panic / failed assertion, rather than busy looping

This commit is contained in:
Kevin Lange 2011-02-13 23:41:43 -06:00
parent d42b2168c4
commit 4b72e895fb
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ void halt_and_catch_fire(char * error_message, const char * file, int line) {
kprintf("PANIC! %s\n", error_message);
kprintf("File: %s\n", file);
kprintf("Line: %d\n", line);
for (;;);
__asm__ __volatile__ ("hlt");
}
void assert_failed(const char *file, uint32_t line, const char *desc) {
@ -15,5 +15,5 @@ void assert_failed(const char *file, uint32_t line, const char *desc) {
kprintf("ASSERTION FAILED! %s\n", desc);
kprintf("File: %s\n", file);
kprintf("Line: %d\n", line);
for (;;);
__asm__ __volatile__ ("hlt");
}