X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc.h;h=19bb5efaa23a4ec10338382ff61de286b238cc55;hb=088cc866a57a0402f6ba3f232fcf8f59c79626d1;hp=1cacc2bc4a12f42605144234eeeef60f7f6f361a;hpb=0983c6f23534b2388910506e4283bb77b3ebd23d;p=bertos.git diff --git a/bertos/kern/proc.h b/bertos/kern/proc.h index 1cacc2bc..19bb5efa 100644 --- a/bertos/kern/proc.h +++ b/bertos/kern/proc.h @@ -254,10 +254,20 @@ INLINE struct Process *proc_current(void) #if CONFIG_KERN_PRI void proc_setPri(struct Process *proc, int pri); + + INLINE int proc_pri(struct Process *proc) + { + return proc->link.pri; + } #else INLINE void proc_setPri(UNUSED_ARG(struct Process *,proc), UNUSED_ARG(int, pri)) { } + + INLINE int proc_pri(UNUSED_ARG(struct Process *, proc)) + { + return 0; + } #endif #if CONFIG_KERN_PREEMPT