X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc_p.h;h=27d65fe288193a3a78aa579c370fbb43273f1586;hb=d9d931610bca1df6ceb9227eacc9ff2c7f89b77a;hp=f1b5aa34805503296c4954ea248cf17186fecdb1;hpb=32d1445272120a254d77ce8d1af1f527da7a2c17;p=bertos.git diff --git a/bertos/kern/proc_p.h b/bertos/kern/proc_p.h index f1b5aa34..27d65fe2 100644 --- a/bertos/kern/proc_p.h +++ b/bertos/kern/proc_p.h @@ -49,7 +49,6 @@ #include // IRQ_ASSERT_DISABLED() #include // struct Process -#include // idle_proc /** @@ -71,7 +70,7 @@ extern REGISTER Process *current_process; extern REGISTER List proc_ready_list; #if CONFIG_KERN_PRI - #define prio_next() (LIST_EMPTY(&proc_ready_list) ? idle_proc->link.pri : \ + #define prio_next() (LIST_EMPTY(&proc_ready_list) ? INT_MIN : \ ((PriNode *)LIST_HEAD(&proc_ready_list))->pri) #define prio_curr() (current_process->link.pri) @@ -145,10 +144,18 @@ INLINE void sched_reenqueue(struct Process *proc) } #endif //CONFIG_KERN_PRI -/// Schedule another process *without* adding the current one to the ready list. -void proc_switch(void); +/* Process trampoline */ void proc_entry(void); +/* Schedule another process *without* adding the current one to the ready list. */ +void proc_switch(void); + +/* Low level scheduling routine. */ +void proc_schedule(void); + +/* Initialize a scheduler class. */ +void proc_schedInit(void); + #if CONFIG_KERN_MONITOR /** Initialize the monitor */ void monitor_init(void);