Skip to content

Commit 4778bbb

Browse files
committed
Adds SemphrGetCountFromISR with QMsgWaitingFromISR
1 parent eec4233 commit 4778bbb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

include/semphr.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,4 +1172,18 @@ typedef QueueHandle_t SemaphoreHandle_t;
11721172
*/
11731173
#define uxSemaphoreGetCount( xSemaphore ) uxQueueMessagesWaiting( ( QueueHandle_t ) ( xSemaphore ) )
11741174

1175+
/**
1176+
* semphr.h
1177+
* <pre>
1178+
* UBaseType_t uxSemaphoreGetCountFromISR( SemaphoreHandle_t xSemaphore );
1179+
* </pre>
1180+
*
1181+
* If the semaphore is a counting semaphore then uxSemaphoreGetCountFromISR() returns
1182+
* its current count value. If the semaphore is a binary semaphore then
1183+
* uxSemaphoreGetCountFromISR() returns 1 if the semaphore is available, and 0 if the
1184+
* semaphore is not available.
1185+
*
1186+
*/
1187+
#define uxSemaphoreGetCountFromISR( xSemaphore ) uxQueueMessagesWaitingFromISR( ( QueueHandle_t ) ( xSemaphore ) )
1188+
11751189
#endif /* SEMAPHORE_H */

0 commit comments

Comments
 (0)