projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parametric scheduler approach.
[bertos.git]
/
bertos
/
kern
/
coop.c
diff --git
a/bertos/kern/coop.c
b/bertos/kern/coop.c
index be3d6dfdb0756915bf339ab8e3bc8ab0476a0673..2173126017acf0ffb2187ae5b0a3fb6f085c1ef2 100644
(file)
--- a/
bertos/kern/coop.c
+++ b/
bertos/kern/coop.c
@@
-63,7
+63,7
@@
EXTERN_C void asm_switch_context(cpu_stack_t **new_sp, cpu_stack_t **save_sp);
* System scheduler: pass CPU control to the next process in
* the ready queue.
*/
* System scheduler: pass CPU control to the next process in
* the ready queue.
*/
-static void
proc
_schedule(void)
+static void
coop
_schedule(void)
{
cpu_flags_t flags;
{
cpu_flags_t flags;
@@
-98,12
+98,12
@@
static void proc_schedule(void)
IRQ_RESTORE(flags);
}
IRQ_RESTORE(flags);
}
-void
proc
_switch(void)
+void
coop
_switch(void)
{
/* Remember old process to save its context later */
Process * const old_process = current_process;
{
/* Remember old process to save its context later */
Process * const old_process = current_process;
-
proc
_schedule();
+
coop
_schedule();
/*
* Optimization: don't switch contexts when the active
/*
* Optimization: don't switch contexts when the active
@@
-135,7
+135,7
@@
void proc_switch(void)
/**
* Co-operative context switch
*/
/**
* Co-operative context switch
*/
-void
proc
_yield(void)
+void
coop
_yield(void)
{
ATOMIC(SCHED_ENQUEUE(current_process));
proc_switch();
{
ATOMIC(SCHED_ENQUEUE(current_process));
proc_switch();