class: etk::Semaphore


Description:

Generic semaphore wrapper ( it is os independent)

Constructor and Destructor:

+                 Semaphore   (uint32_t _nbBasicElement,
uint32_t _nbMessageMax);
+ ~Semaphore (void );

Synopsis:

+ uint32_t        getCount    (void );
+ void post (void );
+ void wait (void );
+ bool wait (uint64_t _timeOutInUs);

Detail:

Semaphore

+  Semaphore (uint32_t _nbBasicElement,
uint32_t _nbMessageMax);
Contruct the inithialized semaphore.


~Semaphore

+  ~Semaphore (void );
Generic destructor.


getCount

+ uint32_t getCount (void );
Get the number of element in the semaphore.


post

+ void post (void );
Post a new semaphore


wait

+ void wait (void );
Wait for a new semaphore post by an other thread.


wait

+ bool wait (uint64_t _timeOutInUs);
Wait for a new semaphore post by an other thread, with a timeout in micro-second.