From 34fca4e872b126dbc3c60789345d88a76e0bfb6c Mon Sep 17 00:00:00 2001 From: "W. Eric Norum" Date: Fri, 28 Apr 2000 14:59:51 +0000 Subject: [PATCH] Add implementation of threadGetPrioritySelf(). --- src/libCom/osi/os/RTEMS/osdThread.c | 5 +++++ src/libCom/osi/os/posix/osdThread.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/libCom/osi/os/RTEMS/osdThread.c b/src/libCom/osi/os/RTEMS/osdThread.c index 5cdaea59c..c088d2920 100644 --- a/src/libCom/osi/os/RTEMS/osdThread.c +++ b/src/libCom/osi/os/RTEMS/osdThread.c @@ -295,6 +295,11 @@ unsigned int threadGetPriority(threadId id) return threadGetOsiPriorityValue (pri); } +unsigned int threadGetPrioritySelf(void) +{ + return threadGetPriority((threadId)RTEMS_SELF); +} + void threadSetPriority (threadId id,unsigned int osip) { diff --git a/src/libCom/osi/os/posix/osdThread.c b/src/libCom/osi/os/posix/osdThread.c index da19f616c..9d0d10760 100644 --- a/src/libCom/osi/os/posix/osdThread.c +++ b/src/libCom/osi/os/posix/osdThread.c @@ -328,6 +328,12 @@ unsigned int threadGetPriority(threadId id) return(pthreadInfo->osiPriority); } +unsigned int threadGetPrioritySelf(void) +{ + threadInfo *pthreadInfo = (threadInfo *)pthread_getspecific(getpthreadInfo); + return(pthreadInfo->osiPriority); +} + void threadSetPriority(threadId id,unsigned int priority) { threadInfo *pthreadInfo = (threadInfo *)id;