Components/Libraries/XF/FreeRTOS/Semaphore
(Difference between revisions)
Sara.chalokh (Talk | contribs) (→~Semaphore()) |
Sara.chalokh (Talk | contribs) (→baseUInt getCount()) |
||
Line 24: | Line 24: | ||
== baseUInt getCount() == | == baseUInt getCount() == | ||
=== Description === | === Description === | ||
+ | Returns the count of the semaphore | ||
+ | |||
== bool take(timeSize oTimeToWait) == | == bool take(timeSize oTimeToWait) == | ||
=== Description === | === Description === |
Revision as of 13:59, 10 August 2017
|
Semaphore
This class is a C++ class that manage a FreeRTOS Semaphore.
Member Attibuts
SemaphoreHandle_t _semaphoreHandler : The FreeRTOS semaphore
Member Functions Description
Semaphore(baseUInt oMaxCount, baseUInt oInitalCount)
Description
The constructor of the semaphore. It will create a free RTOS semaphore and initialize it with the given count value
Parameters
oMaxCount : the maximal count value that can be reached
oInitalCount : the count value assigned to the semaphore when it is created
~Semaphore()
Description
The destructor of the Semaphore. It will delete the free RTOS semaphore
IMPORTANT : do not delete a semaphore that has thread blocked on it. (tasks that are in the Blocked state waiting for the semaphore to become available)
baseUInt getCount()
Description
Returns the count of the semaphore