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