Added comment about danger of dropping into monitor()
authorKevin Klues <klueska@parcad.millennium.berkeley.edu>
Fri, 23 Apr 2010 23:45:02 +0000 (16:45 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:44 +0000 (17:35 -0700)
kern/src/schedule.c

index b6420b8..a5ce0f1 100644 (file)
@@ -76,6 +76,9 @@ void schedule(void)
                proc_decref(p, 1);
        } else {
                spin_unlock_irqsave(&runnablelist_lock);
+               /* while this is problematic, we really don't have anything to
+         * do and could run off the end of the kernel stack if we just
+         * smp_idle -> manager -> schedule -> smp_idle. */
                printk("No processes to schedule, enjoy the Monitor!\n");
                while (1)
                        monitor(NULL);