There is no way to get that information.
Well, it could be done by changing
to a (linked) list of held mutexes. Then for each
do something like:
xTCB *pxWaitingTCB = listGET_OWNER_OF_HEAD_ENTRY(mutex->xTasksWaitingToReceive);
if( NULL != pxWaitingTCB && pxWaitingTCB->uxPriority > uxDisinheritPriority)
uxDisinheritPrioriy = pxWaitingTCB->uxPriority;
pxTCB->uxPriority = uxDisinheritPriority;
It is not much code and it will not generate significant performance impact since the list of mutexes held will probably be quite short.