13 #include <semaphore.h>
72 volatile BUInt ovalue;
const BTimeout BTimeoutForever
Definition: BTypes.h:46
BUInt32 BUInt
Definition: BTypes.h:33
bool Bool
Definition: BTypes.h:18
BUInt32 BTimeout
Definition: BTypes.h:45
Mutex class. Note these are recursive Mutexes and so you need to make sure the number of unlocks equa...
Definition: BMutex.h:14
Boolean semaphore.
Definition: BSemaphore.h:33
int operator==(Bool on)
Definition: BSemaphore.cpp:99
void clear()
Definition: BSemaphore.cpp:78
Bool wait(Bool v=1, BTimeout timeoutUs=BTimeoutForever)
Wait for the semaphore.
Definition: BSemaphore.cpp:83
BSemaphoreBool()
Definition: BSemaphore.cpp:62
~BSemaphoreBool()
Definition: BSemaphore.cpp:70
BSemaphoreBool & operator=(Bool on)
Definition: BSemaphore.cpp:104
void set(Bool on=1)
Definition: BSemaphore.cpp:73
Bool value()
Definition: BSemaphore.cpp:91
Integer counting semaphore.
Definition: BSemaphore.h:54
void setValue(BUInt v)
Definition: BSemaphore.cpp:154
BSemaphoreCount()
Definition: BSemaphore.cpp:112
BUInt value()
Definition: BSemaphore.cpp:161
Bool take(BUInt v=1, BTimeout timeoutUs=BTimeoutForever)
Take for the semaphore.
Definition: BSemaphore.cpp:143
BSemaphoreCount & operator=(const BSemaphoreCount &semaphore)
Definition: BSemaphore.cpp:120
void add(int v=1)
Set the semaphore.
Definition: BSemaphore.cpp:128
~BSemaphoreCount()
Definition: BSemaphore.cpp:125
Bool wait(BUInt v=1, BTimeout timeoutUs=BTimeoutForever)
Wait for the semaphore.
Definition: BSemaphore.cpp:135
Base Semaphore class.
Definition: BSemaphore.h:16
Bool wait(BTimeout timeoutUs=BTimeoutForever)
Wait for the semaphore.
Definition: BSemaphore.cpp:33
~BSemaphore()
Definition: BSemaphore.cpp:25
int getValue() const
Definition: BSemaphore.cpp:53
BSemaphore()
Definition: BSemaphore.cpp:11
BSemaphore & operator=(const BSemaphore &semaphore)
Definition: BSemaphore.cpp:19
void set()
Set the semaphore.
Definition: BSemaphore.cpp:29