TaskHandle_t xSemaphoreGetMutexHolder( SemaphoreHandle_t xMutex );
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.|
- The handle of the task that holds the mutex specified by the xMutex parameter. NULL is returned if the semaphore passed in the xMutex parameter is not a mutex type semaphore, or if the mutex is available and so not held by any task.
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.