1 #if !defined(__ABSTRACTSEMAPHORE_HPP) 2 #define __ABSTRACTSEMAPHORE_HPP 24 #if !defined(__COMMON_HPP) 28 #if !defined(__SEMAPHOREEXCEPTION_HPP) 29 #include <SemaphoreException.hpp> 207 return theSemIdentifier;
215 return theGroupIdentifier;
220 virtual ThreadIdentifierRef
getOwnerId(
void ) = 0;
252 Int theGroupIdentifier;
261 #endif // if !defined(__ABSTRACTSEMAPHORE_HPP) Kernel error, errno set.
Definition: AbstractSemaphore.hpp:43
Semaphore request timed out.
Definition: AbstractSemaphore.hpp:55
Int getInitialValue(void)
Retrieves the initial value for a semaphore.
Definition: AbstractSemaphore.cpp:120
SemaphoreGroupIdentifierCref getGroupIdentifier(void) const
Returns a reference to the SemaphoreGroup identifier.
Definition: AbstractSemaphore.cpp:108
Semaphore balked request.
Definition: AbstractSemaphore.hpp:51
AbstractSemaphore(SemaphoreGroupPtr, SemaphoreIdentifierRef)
Default constructor.
Definition: AbstractSemaphore.cpp:64
Semaphore unavailable for request.
Definition: AbstractSemaphore.hpp:59
SemaphoreIdentifierRef getId(void)
Returns a reference to the AbstractSemaphore identifier.
Definition: AbstractSemaphore.hpp:205
virtual CounterCref getRecursionQueueLength(void) const =0
Return the depth of the recursion for the owner.
Call success.
Definition: AbstractSemaphore.hpp:47
virtual bool isRecursionEnabled(void) const =0
Returns true if recursion allowed.
bool operator==(AbstractSemaphoreCref aRef) const
Equality operator returns true if identifiers match.
SemaphoreOperationStatus setLock(Int)
Calls kernel lock mechanism.
Definition: AbstractSemaphore.cpp:147
SemaphoreOperationStatus
Semaphore method return enumeration.
Definition: AbstractSemaphore.hpp:39
virtual ThreadIdentifierCref getOwningThreadIdentifier(void) const =0
Returns the identifier of who currently owns the semaphore.
SemaphoreOperationStatus setUnlock(Int)
Calls kernel unlock mechanism.
Definition: AbstractSemaphore.cpp:167
SemaphoreIdentifierCref getIdentifier(void) const
Return a reference to this AbstractSemaphore identifier.
Definition: AbstractSemaphore.cpp:113
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
NullPointerException is the base exception type for NullPointer.
Definition: NullPointerException.hpp:40
virtual SemaphoreOperationStatus release(void)=0
Request the AbstractSemaphore but timeout if not available.
ScalarIdentifier provides a templated interface for declaring CoreLinux Identifiers for simple scalar...
Definition: ScalarIdentifiers.hpp:37
A AbstractSemaphore supports the protocol that processes and/or threads agree to follow for the purpo...
Definition: AbstractSemaphore.hpp:85
virtual ThreadIdentifierRef getOwnerId(void)=0
Returns a reference to the owning thread.
SemaphoreException is the base exception type for Semaphore.
Definition: SemaphoreException.hpp:39
virtual bool isLocked(void)=0
Ask if AbstractSemaphore instance is locked.
Assertion is-a Exception created when an assertion fails.
Definition: Assertion.hpp:423
Synchronized is a mixin which allows class objects to enable monitor functionality.
Definition: Synchronized.hpp:41
Int getValue(void)
Returns the current value of the semaphore.
Definition: AbstractSemaphore.cpp:130
virtual bool isBalkingEnabled(void) const =0
Returns true if balking enabled.
virtual ~AbstractSemaphore(void)
Virtual Destructor.
Definition: AbstractSemaphore.cpp:101
SemaphoreOperationStatus waitZero(Int)
Calls kernel zero mechanism.
Definition: AbstractSemaphore.cpp:184
Int getGroupId(void) const
Returns a reference to the group identifier.
Definition: AbstractSemaphore.hpp:213
SemaphoreOperationStatus setValue(Int)
Sets the value for the AbstractSemaphore.
Definition: AbstractSemaphore.cpp:200
virtual SemaphoreOperationStatus lockWithWait(void)=0
Request the lock, wait for availability.
A SemaphoreGroup is an extension to the Linux semaphore set.
Definition: SemaphoreGroup.hpp:62
virtual SemaphoreOperationStatus lockWithNoWait(void)=0
Request the lock without waiting.