semphr.h
{c}
UBaseType_t uxSemaphoreGetCountFromISR( SemaphoreHandle_t xSemaphore );
If the semaphore is a counting semaphore then uxSemaphoreGetCountFromISR() returns its current count value. If the semaphore is a binary semaphore then uxSemaphoreGetCountFromISR() returns 1 if the semaphore is available, and 0 if the semaphore is not available.