#include <GuardSemaphore.hpp>
Public Member Functions | |
GuardSemaphore (SemaphoreGroupPtr, SemaphoreIdentifierRef) throw (Assertion) | |
Default constructor requires the identifier of the semaphore in the semaphore group. | |
virtual | ~GuardSemaphore (void) |
Virtual Destructor. | |
virtual SemaphoreOperationStatus | lockWithWait (void) throw (SemaphoreException) |
Request the lock, wait for availability. | |
virtual SemaphoreOperationStatus | lockWithNoWait (void) throw (SemaphoreException) |
Request the lock without waiting. | |
virtual bool | isLocked (void) |
Ask if AbstractSemaphore instance is locked. | |
virtual SemaphoreOperationStatus | release (void) throw (SemaphoreException) |
Request the AbstractSemaphore but timeout if not available. | |
Protected Member Functions | |
GuardSemaphore (void) throw (Assertion) | |
Default constructor throws assertion. | |
GuardSemaphore (GuardSemaphoreCref) throw (Assertion) | |
Copy constructor throws assertion. | |
GuardSemaphoreRef | operator= (GuardSemaphoreCref) throw (Assertion) |
Assignment operator throws assertion. |
It has the basic behavior of a MutexSemaphore without the recursion and balking capability. Its sole use is for Synchronized object monitor control.
corelinux::GuardSemaphore::GuardSemaphore | ( | SemaphoreGroupPtr | aGroup, | |
SemaphoreIdentifierRef | aIdentifier | |||
) | throw (Assertion) |
Default constructor requires the identifier of the semaphore in the semaphore group.
SemaphoreGroup | The owning SemaphoreGroup | |
SemaphoreIdentifier | The identifier from the Semaphore Group |
References corelinux::AbstractSemaphore::setValue().
SemaphoreOperationStatus corelinux::GuardSemaphore::release | ( | void | ) | throw (SemaphoreException) [virtual] |
Request the AbstractSemaphore but timeout if not available.
Release the lock
Implements corelinux::AbstractSemaphore.
References corelinux::AbstractSemaphore::setUnlock(), and corelinux::SUCCESS.