Adds SemphrGetCountFromISR with QMsgWaitingFromISR (#345)

* Adds SemphrGetCountFromISR with QMsgWaitingFromISR
This commit is contained in:
Raul Rojas 2021-06-08 20:48:52 -04:00 committed by GitHub
parent eec42331b4
commit bad8f01afd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

1
.github/lexicon.txt vendored
View File

@ -2440,6 +2440,7 @@ uxsavedmaskvalue
uxsavedtaskstackpointer
uxschedulersuspended
uxsemaphoregetcount
uxsemaphoregetcountfromisr
uxstate
uxstreambuffernumber
uxtaskgetnumberoftasks

View File

@ -1172,4 +1172,18 @@ typedef QueueHandle_t SemaphoreHandle_t;
*/
#define uxSemaphoreGetCount( xSemaphore ) uxQueueMessagesWaiting( ( QueueHandle_t ) ( xSemaphore ) )
/**
* semphr.h
* <pre>
* UBaseType_t uxSemaphoreGetCountFromISR( SemaphoreHandle_t xSemaphore );
* </pre>
*
* 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.
*
*/
#define uxSemaphoreGetCountFromISR( xSemaphore ) uxQueueMessagesWaitingFromISR( ( QueueHandle_t ) ( xSemaphore ) )
#endif /* SEMAPHORE_H */