diff --git a/src/libCom/osi/os/posix/osdThread.c b/src/libCom/osi/os/posix/osdThread.c index 9d0d10760..73b07037b 100644 --- a/src/libCom/osi/os/posix/osdThread.c +++ b/src/libCom/osi/os/posix/osdThread.c @@ -330,8 +330,7 @@ unsigned int threadGetPriority(threadId id) unsigned int threadGetPrioritySelf(void) { - threadInfo *pthreadInfo = (threadInfo *)pthread_getspecific(getpthreadInfo); - return(pthreadInfo->osiPriority); + return(threadGetPriority(threadGetIdSelf())); } void threadSetPriority(threadId id,unsigned int priority) diff --git a/src/libCom/osi/os/vxWorks/osdThread.c b/src/libCom/osi/os/vxWorks/osdThread.c index 342ab78d8..cde537642 100644 --- a/src/libCom/osi/os/vxWorks/osdThread.c +++ b/src/libCom/osi/os/vxWorks/osdThread.c @@ -165,6 +165,11 @@ unsigned int threadGetPriority(threadId id) return(getOsiPriorityValue(priority)); } +unsigned int threadGetPrioritySelf(void) +{ + return(threadGetPriority(threadGetIdSelf())); +} + void threadSetPriority(threadId id,unsigned int osip) { int tid = (int)id;