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;