From 3696149d8d1cfe5897ad0ae26ac3af893f683d61 Mon Sep 17 00:00:00 2001 From: acevest Date: Sun, 21 May 2023 23:10:22 +0800 Subject: [PATCH] =?utf8?q?=E6=94=B9=E5=96=84panic=E6=97=B6=E7=9A=84cpu?= =?utf8?q?=E6=BB=A1=E8=BD=BD=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- include/system.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/system.h b/include/system.h index 3e56a3e..2721475 100644 --- a/include/system.h +++ b/include/system.h @@ -61,8 +61,9 @@ void kfree(void *addr); do { \ asm("cli;"); \ printk("PANIC:" msg " file:%s function:%s line:%d\n", ##__VA_ARGS__, __FILE__, __FUNCTION__, __LINE__); \ - while (1) \ - ; \ + while (1) { \ + asm("hlt"); \ + } \ } while (0); extern char etext, edata, end; -- 2.44.0