提交 289bbef7 创建 作者: kolya's avatar kolya

minor cleanup

上级 f73b8120
...@@ -290,7 +290,7 @@ panic(char *s) ...@@ -290,7 +290,7 @@ panic(char *s)
int i; int i;
uint pcs[10]; uint pcs[10];
__asm __volatile("cli"); cli();
use_console_lock = 0; use_console_lock = 0;
cprintf("cpu%d: panic: ", cpu()); cprintf("cpu%d: panic: ", cpu());
cprintf(s); cprintf(s);
......
...@@ -97,8 +97,8 @@ cpu(void) ...@@ -97,8 +97,8 @@ cpu(void)
// Cannot call cpu when interrupts are enabled: // Cannot call cpu when interrupts are enabled:
// result not guaranteed to last long enough to be used! // result not guaranteed to last long enough to be used!
// Would prefer to panic but even printing is chancy here: // Would prefer to panic but even printing is chancy here:
// everything, including cprintf, calls cpu, at least indirectly // almost everything, including cprintf and panic, calls cpu,
// through acquire and release. // often indirectly through acquire and release.
if(read_eflags()&FL_IF){ if(read_eflags()&FL_IF){
static int n; static int n;
if(n++ == 0) if(n++ == 0)
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论