shorten comment
This commit is contained in:
parent
ed396c068b
commit
7c00ce8110
1 changed files with 2 additions and 6 deletions
8
proc.c
8
proc.c
|
@ -36,13 +36,9 @@ cpuid() {
|
||||||
struct cpu*
|
struct cpu*
|
||||||
mycpu(void)
|
mycpu(void)
|
||||||
{
|
{
|
||||||
// Would prefer to panic but even printing is chancy here: almost everything,
|
|
||||||
// including cprintf and panic, calls mycpu(), often indirectly through
|
|
||||||
// acquire and release.
|
|
||||||
if(readeflags()&FL_IF){
|
if(readeflags()&FL_IF){
|
||||||
static int n;
|
// Would prefer to panic but panic calls mycpu().
|
||||||
if(n++ == 0)
|
cprintf("mycpu called from %x with interrupts enabled\n",
|
||||||
cprintf("mycpu called from %x with interrupts enabled\n",
|
|
||||||
__builtin_return_address(0));
|
__builtin_return_address(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue