proc_switch(): rename from proc_schedule(). Split out the real cooperative scheduler.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 25 Aug 2008 19:22:22 +0000 (19:22 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 25 Aug 2008 19:22:22 +0000 (19:22 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1701 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/kern/proc_p.h
bertos/kern/sem.c
bertos/kern/signal.c

index f31fc621ff8461416e725722bc531afa221a7f29..a0e87be22ba6f870e0536db7e35edd997cea9a6f 100644 (file)
@@ -133,8 +133,8 @@ extern REGISTER List     ProcReadyList;
 
 #endif // !CONFIG_KERN_PRI
 
-/** Schedule to another process *without* adding the current to the ready list. */
-void proc_schedule(void);
+/// Schedule another process *without* adding the current one to the ready list.
+void proc_switch(void);
 
 #if CONFIG_KERN_PREEMPT
 void proc_entry(void (*user_entry)(void));
index e4ec941b35f3a644cbafc12192155fd0fc76f767..cc9234aa64a020531a6c1e354d93bd595fd80f6d 100644 (file)
@@ -128,7 +128,7 @@ void sem_obtain(struct Semaphore *s)
                 * be locked for us.
                 */
                proc_permit();
-               proc_schedule();
+               proc_switch();
        }
        else
        {
index 3e882cef168775f53367cf0561195bdfd9587495..d4fe178ed75567c21348dc72b1665eb477a608a3 100644 (file)
@@ -164,13 +164,13 @@ sigmask_t sig_wait(sigmask_t sigs)
                CurrentProcess->sig_wait = sigs;
 
                /*
-                * Go to sleep and proc_schedule() another process.
+                * Go to sleep and proc_switch() to another process.
                 *
-                * We re-enable IRQs because proc_schedule() does not
+                * We re-enable IRQs because proc_switch() does not
                 * guarantee to save and restore the interrupt mask.
                 */
                IRQ_RESTORE(flags);
-               proc_schedule();
+               proc_switch();
                IRQ_SAVE_DISABLE(flags);
 
                /*