From 16138e815e7fe2e86b1685aeeb395eb43b453881 Mon Sep 17 00:00:00 2001 From: asterix Date: Wed, 11 Jan 2012 14:40:14 +0000 Subject: [PATCH] Add proc_pri function to extract a Process priority. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5238 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/proc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.25.1