From f97f0d2b3d3afbad3ef154b047f1b0408fd7288b Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 27 Sep 2007 21:02:03 +0000 Subject: [PATCH] cleaner --- defs.h | 2 +- lapic.c | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/defs.h b/defs.h index beb48fe..661f761 100644 --- a/defs.h +++ b/defs.h @@ -92,7 +92,7 @@ int pipewrite(struct pipe*, char*, int); // proc.c struct proc* copyproc(struct proc*); -struct proc* curproc(); +struct proc* curproc(void); void exit(void); int growproc(int); int kill(int); diff --git a/lapic.c b/lapic.c index 3ce5842..d4429a5 100644 --- a/lapic.c +++ b/lapic.c @@ -101,16 +101,8 @@ cpu(void) // through acquire and release. if(read_eflags()&FL_IF){ static int n; - int i; - uint pcs[10]; - - if(n++%999 == 0){ - getcallerpcs((uint*)read_ebp() + 2, pcs); - cprintf("cpu called from %x with interrupts enabled: stk"); - for(i=0; i<10 && pcs[i] && pcs[i] != -1; i++) - cprintf(" %x", pcs[i]); - cprintf("\n"); - } + if(n++ == 0) + cprintf("cpu called from %x with interrupts enabled\n", ((uint*)read_ebp())[1]); } if(lapic)