X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc.h;h=afb9639f28b68a6c30decee00eae6f220dcc6977;hb=48fa213cd00cd385ee7274baf83761099a6ceead;hp=db681ede2c828535dafad80376004d74f32552b2;hpb=b533b06587ec86967098af153269dbbf1e2dd450;p=bertos.git diff --git a/bertos/kern/proc.h b/bertos/kern/proc.h index db681ede..afb9639f 100644 --- a/bertos/kern/proc.h +++ b/bertos/kern/proc.h @@ -46,6 +46,7 @@ #endif #include // cpustack_t +#include // CPU_SAVED_REGS_CNT /* * Forward declaration. The definition of struct Process is private to the @@ -65,7 +66,6 @@ struct Process *proc_new_with_name(const char* name, void (*entry)(void), iptr_t void proc_exit(void); void proc_yield(void); -#define proc_switch proc_yield /* OBSOLETE */ int proc_testSetup(void); int proc_testRun(void); @@ -77,6 +77,14 @@ void proc_rename(struct Process *proc, const char *name); const char *proc_name(struct Process *proc); const char *proc_currentName(void); +#if CONFIG_KERN_PRI + void proc_setPri(struct Process *proc, int pri); +#else + INLINE void proc_setPri(UNUSED_ARG(struct Process *,proc), UNUSED_ARG(int, pri)) + { + } +#endif + /** * Disable preemptive task switching. * @@ -138,6 +146,7 @@ INLINE void proc_permit(void) #endif } +extern int preempt_forbid_cnt; /** * Execute a block of \a CODE atomically with respect to task scheduling. @@ -180,8 +189,6 @@ INLINE void proc_permit(void) #endif #endif -#define CONFIG_PROC_DEFSTACKSIZE CONFIG_KERN_MINSTACKSIZE // OBSOLETE - /* Memory fill codes to help debugging */ #if CONFIG_KERN_MONITOR #include