|
IntrOS
|
create and initialize a semaphore object More...
#include <ossemaphore.h>
Public Types | |
| using | Ptr = std::unique_ptr<Semaphore> |
| result type of Create() | |
Public Member Functions | |
| constexpr | Semaphore () |
| constructor, see the constructor parameters of the class | |
| constexpr | Semaphore (const unsigned _init, const unsigned _limit=semDefault) |
| constructor, see the constructor parameters of the class | |
| Semaphore (Semaphore &&_src) | |
| move constructor | |
| Semaphore (const Semaphore &)=delete | |
| Semaphore & | operator= (Semaphore &&)=delete |
| Semaphore & | operator= (const Semaphore &)=delete |
| void | reset () |
| sem_reset() | |
| void | kill () |
| sem_kill() | |
| int | take () |
| sem_take() | |
| int | tryWait () |
| sem_tryWait() | |
| template<typename T> | |
| int | waitFor (const T &_delay) |
| sem_waitFor() | |
| template<typename T> | |
| int | waitUntil (const T &_time) |
| sem_waitUntil() | |
| int | wait () |
| sem_wait() | |
| int | give () |
| sem_give() | |
| int | post () |
| sem_post() | |
| int | release (unsigned _num) |
| sem_release() | |
| unsigned | getValue () |
| sem_getValue() | |
| int | takeAsync () |
| sem_takeAsync() | |
| int | waitAsync () |
| sem_waitAsync() | |
| int | giveAsync () |
| sem_giveAsync() | |
Static Public Member Functions | |
| static Semaphore | Direct () |
| create and initialize static direct semaphore | |
| static Semaphore | Binary (const unsigned _init=0) |
| create and initialize static binary semaphore | |
| static Semaphore | Counting (const unsigned _init=0) |
| create and initialize static counting semaphore | |
create and initialize a semaphore object
|
inlinestatic |
create and initialize static direct semaphore
|
inlinestatic |
create and initialize static binary semaphore
| _init | initial value of semaphore counter |
|
inlinestatic |
create and initialize static counting semaphore
| _init | initial value of semaphore counter |