X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=kern%2Fproc.c;h=ecd4ca41579ab3c7ed0c7a1234fb5a873f5659a8;hb=7c051389f54e9da902884c617cb881a052b0c101;hp=24f93d481a20a74870fc5e3163ba3946a701b023;hpb=b84e872f616fe496961b7b8a9eeb672cf7fb8025;p=bertos.git diff --git a/kern/proc.c b/kern/proc.c index 24f93d48..ecd4ca41 100755 --- a/kern/proc.c +++ b/kern/proc.c @@ -17,6 +17,12 @@ /*#* *#* $Log$ + *#* Revision 1.30 2006/03/27 04:49:23 bernie + *#* CPU_IDLE(): Fix for new emulator. + *#* + *#* Revision 1.29 2006/02/24 01:17:05 bernie + *#* Update for new emulator. + *#* *#* Revision 1.28 2006/02/21 16:06:55 bernie *#* Cleanup/update process scheduling. *#* @@ -308,12 +314,14 @@ void proc_schedule(void) /* Remember old process to save its context later */ old_process = CurrentProcess; +#ifdef IRQ_RUNNING /* Scheduling in interrupts is a nono. */ ASSERT(!IRQ_RUNNING()); +#endif /* Poll on the ready queue for the first ready process */ IRQ_SAVE_DISABLE(flags); - while (!(CurrentProcess = (struct Process *)REMHEAD(&ProcReadyList))) + while (!(CurrentProcess = (struct Process *)list_remHead(&ProcReadyList))) { /* * Make sure we physically reenable interrupts here, no matter what @@ -326,7 +334,7 @@ void proc_schedule(void) * reason to do this. */ IRQ_ENABLE; - SCHEDULER_IDLE; + CPU_IDLE; IRQ_DISABLE; } IRQ_RESTORE(flags);