EpcTools
An event based multi-threaded C++ development framework.
|
Represents a public semaphore, the semaphore data is located in shared memory. More...
#include <esynch.h>
Public Member Functions | |
ESemaphorePublic () | |
Default constructor. More... | |
ESemaphorePublic (Long initcnt, Bool bInit=True) | |
Class constructor. More... | |
~ESemaphorePublic () | |
Class destructor. More... | |
Void | init (Long initialCount) |
Initializes the data associated with the semaphore. More... | |
Void | destroy () |
Destroys the data associated with the semaphore. More... | |
Int & | semIndex () |
Retrieves the semaphore data index. More... | |
Void | attach (Int semid) |
Attaches this object to the semaphore data associated with the semaphore ID. More... | |
Void | detach () |
Detaches from the semaphore data. More... | |
![]() | |
ESemaphoreBase () | |
Default constructor. More... | |
~ESemaphoreBase () | |
Class desctructor. More... | |
Bool | Decrement (Bool wait=True) |
Decrements the semaphore value. More... | |
Bool | Increment () |
Increments the semaphore value. More... | |
Bool | initialized () |
Indicates the initialization status for this object. More... | |
Bool & | shared () |
Indicates if this object is to be shared between processes. More... | |
Long & | initialCount () |
Retrieves the initial semaphore value. More... | |
Long | currCount () |
Retrieves the current semaphore value. More... | |
operator ESemaphoreData & () | |
Retrieves a reference to the underlying semaphore data. More... | |
Friends | |
class | ESynchObjects |
Represents a public semaphore, the semaphore data is located in shared memory.
|
inline |
Default constructor.
|
inline |
Class constructor.
initcnt | the initial count for the semaphore. |
bInit | directs the constructor to initialize the semaphore. |
|
inline |
Class destructor.
Void ESemaphorePublic::attach | ( | Int | semid | ) |
Attaches this object to the semaphore data associated with the semaphore ID.
semid | the semaphore ID. |
|
virtual |
Destroys the data associated with the semaphore.
Implements ESemaphoreBase.
Void ESemaphorePublic::detach | ( | ) |
Detaches from the semaphore data.
|
virtual |
Initializes the data associated with the semaphore.
initialCount | the initial count for the semaphore. |
Implements ESemaphoreBase.
Int & ESemaphorePublic::semIndex | ( | ) |
Retrieves the semaphore data index.
|
friend |