There is an API function xSemaphoreGetMutexHolder. For some reason, on the API page http://www.freertos.org/xSemaphoreGetMutexHolder.html return type is missing.
So I looked in the source code and saw that xSemaphoreGetMutexHolder is actually a macro for xQueueGetMutexHolder. And xQueueGetMutexHolder returns “void *” although it’s prefix (x) should mean something else.
I’m not entirely sure what does x-prefix mean but every other functions that return “void *” are prefixed with “pv”.
After reading API reference I figured out that it actually should return TaskHandle_t (which is a typedef for void *).
Although this is not a bug I’m not sure it’s as it should be.
Return type is also missing in API references for xSemaphoreTake, xSemaphoreTakeFromISR, xSemaphoreTakeRecursive, xSemaphoreGive, xSemaphoreGiveRecursive and xSemaphoreGiveFromISR.