]> Devi Nivas Git - cs3210-lab1.git/commitdiff
shorten comment
authorFrans Kaashoek <kaashoek@mit.edu>
Thu, 2 Feb 2017 00:18:47 +0000 (19:18 -0500)
committerFrans Kaashoek <kaashoek@mit.edu>
Thu, 2 Feb 2017 00:18:47 +0000 (19:18 -0500)
proc.c

diff --git a/proc.c b/proc.c
index 64457253136f203e8b68cdab23dbae743e50c712..9f500f2695408942d5c10bc437f29d711b82a34a 100644 (file)
--- a/proc.c
+++ b/proc.c
@@ -36,13 +36,9 @@ cpuid() {
 struct cpu*
 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){
-    static int n;
-    if(n++ == 0)
-      cprintf("mycpu called from %x with interrupts enabled\n",
+    // Would prefer to panic but panic calls mycpu().
+    cprintf("mycpu called from %x with interrupts enabled\n",
         __builtin_return_address(0));
   }