1 #if !defined(__SEMAPHORE_HPP) 2 #define __SEMAPHORE_HPP 24 #if !defined(__COMMON_HPP) 28 #if !defined(__ABSTRACTSEMAPHORE_HPP) 29 #include <AbstractSemaphore.hpp> 32 #if !defined(__SEMAPHOREEXCEPTION_HPP) 33 #include <SemaphoreException.hpp> 39 DECLARE_CLASS( Semaphore );
161 virtual ThreadIdentifierRef
getOwnerId(
void );
184 ThreadIdentifier theOwningThread;
188 Counter theRecursionQueueLength;
192 bool theRecursiveMode;
201 #endif // if !defined(__SEMAPHORE_HPP) CounterCref operator++(void)
Operator for increasing theRecursionQueueLength.
Definition: Semaphore.cpp:118
virtual ThreadIdentifierCref getOwningThreadIdentifier(void) const
Returns the identifier of who currently owns the semaphore.
Definition: Semaphore.cpp:146
virtual ~Semaphore(void)
Virtual Destructor.
Definition: Semaphore.cpp:90
virtual bool isBalkingEnabled(void) const
Returns true if balking enabled.
Definition: Semaphore.cpp:132
virtual ThreadIdentifierRef getOwnerId(void)
Returns a reference to the owning thread.
Definition: Semaphore.cpp:160
virtual void setRecursionQueueLength(Counter)
Sets the recursion length.
Definition: Semaphore.cpp:174
SemaphoreRef operator=(SemaphoreCref)
Assignment operator throws assertion.
Definition: Semaphore.cpp:110
Semaphore(void)
Default constructor throws assertion.
Definition: Semaphore.cpp:43
bool operator==(SemaphoreCref aRef) const
Equality operator returns true if identifiers match.
Definition: Semaphore.cpp:100
virtual bool isRecursionEnabled(void) const
Returns true if recursion allowed.
Definition: Semaphore.cpp:139
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
NullPointerException is the base exception type for NullPointer.
Definition: NullPointerException.hpp:40
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
A Semaphore supports the protocol that processes and/or threads agree to follow for the purpose of co...
Definition: Semaphore.hpp:61
Assertion is-a Exception created when an assertion fails.
Definition: Assertion.hpp:423
CounterCref operator--(void)
Operator for decreasing theRecursionQueueLength.
Definition: Semaphore.cpp:125
virtual void resetOwnerId(void)
Sets the owner thread id to not owned.
Definition: Semaphore.cpp:181
virtual void setOwnerId(void)
Sets the owner id to the current thread.
Definition: Semaphore.cpp:167
virtual CounterCref getRecursionQueueLength(void) const
Return the depth of the recursion for the owner.
Definition: Semaphore.cpp:153
A SemaphoreGroup is an extension to the Linux semaphore set.
Definition: SemaphoreGroup.hpp:62