proc_schedule(): New sanity check.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 15 Mar 2005 00:20:54 +0000 (00:20 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 15 Mar 2005 00:20:54 +0000 (00:20 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@395 38d2e660-2303-0410-9eaa-f027e97ec537

kern/proc.c

index 164df21e91806b7f1cd366451af14ac2e92e0b56..2abe730c34afb80e4f185809f399470d606c4592 100755 (executable)
@@ -17,6 +17,9 @@
 
 /*#*
  *#* $Log$
+ *#* Revision 1.25  2005/03/15 00:20:54  bernie
+ *#* proc_schedule(): New sanity check.
+ *#*
  *#* Revision 1.24  2005/01/08 09:20:54  bernie
  *#* Remove unused variable.
  *#*
@@ -296,6 +299,9 @@ void proc_schedule(void)
        /* Remember old process to save its context later */
        old_process = CurrentProcess;
 
+       /* Scheduling in interrupts is a nono. */
+       ASSERT(!IRQ_RUNNING());
+
        /* Poll on the ready queue for the first ready process */
        IRQ_SAVE_DISABLE(flags);
        while (!(CurrentProcess = (struct Process *)REMHEAD(&ProcReadyList)))