TaskHandle_t xSemaphoreGetMutexHolder( SemaphoreHandle_t xMutex );INCLUDE_xSemaphoreGetMutexHolder must be set to 1 in FreeRTOSConfig.h for this function to be available.
Return the handle of the task that holds the mutex specified by the function parameter, if any.
xSemaphoreGetMutexHolder() can be used reliably to determine if the calling task is the mutex holder, but cannot be used reliably if the mutex is held by any task other than the calling task. This is because the mutex holder might change between the calling task calling the function, and the calling task testing the function's return value.
configUSE_MUTEXES must be set to 1 in FreeRTOSConfig.h for xSemaphoreGetMutexHolder() to be available.
| xMutex | The handle of the mutex being queried. |