Group xSemaphoreGiveFromISR
Modules > xSemaphoreGiveFromISR
Detailed Description
semphr. h
Macro to release a semaphore. The semaphore must have previously been created with a call to xSemaphoreCreateBinary() or xSemaphoreCreateCounting().
Mutex type semaphores (those created using a call to xSemaphoreCreateMutex()) must not be used with this macro.
This macro can be used from an ISR.
Parameters:
xSemaphore
A handle to the semaphore being released. This is the handle returned when the semaphore was created.pxHigherPriorityTaskWoken
xSemaphoreGiveFromISR() will set *pxHigherPriorityTaskWoken to pdTRUE if giving the semaphore caused a task to unblock, and the unblocked task has a priority higher than the currently running task. If xSemaphoreGiveFromISR() sets this value to pdTRUE then a context switch should be requested before the interrupt is exited.
Returns:
pdTRUE if the semaphore was successfully given, otherwise errQUEUE_FULL.
Example usage: