Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


xSemaphoreGetMutexHolder
[Semaphores]

semphr. h
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.

Parameters:
xMutex The handle of the mutex being queried.
Returns:
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.





[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner