From: bernie Date: Mon, 25 Aug 2008 19:22:22 +0000 (+0000) Subject: proc_switch(): rename from proc_schedule(). Split out the real cooperative scheduler. X-Git-Tag: 2.0.0~233 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0e8fc7e3fe0e2cb2e75d0b3b9da1899f74074d0c;p=bertos.git proc_switch(): rename from proc_schedule(). Split out the real cooperative scheduler. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1701 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/proc_p.h b/bertos/kern/proc_p.h index f31fc621..a0e87be2 100644 --- a/bertos/kern/proc_p.h +++ b/bertos/kern/proc_p.h @@ -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)); diff --git a/bertos/kern/sem.c b/bertos/kern/sem.c index e4ec941b..cc9234aa 100644 --- a/bertos/kern/sem.c +++ b/bertos/kern/sem.c @@ -128,7 +128,7 @@ void sem_obtain(struct Semaphore *s) * be locked for us. */ proc_permit(); - proc_schedule(); + proc_switch(); } else { diff --git a/bertos/kern/signal.c b/bertos/kern/signal.c index 3e882cef..d4fe178e 100644 --- a/bertos/kern/signal.c +++ b/bertos/kern/signal.c @@ -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); /*