corelinux_MutexSemaphore3
Mutexsemaphore implements a mutual exclusion control which can be used to insure that at most one (1) task has access at a time.
Usage
Inherits corelinux::Semaphore.
Public Member Functions
MutexSemaphore (SemaphoreGroupPtr,
SemaphoreIdentifierRef,
bool
AutoLock=false,
bool
Recursive=true,
bool
Balking=false)
throw
(
NullPointerException
)
Virtual Destructor.
virtual
bool
isLocked
(void)
Protected Member Functions
MutexSemaphore (void)
throw
(
Assertion
)
Detailed Description
MutexSemaphore implements a mutual exclusion control which can be used to insure that at most one (1) task has access at a time.
The semantics for Recursion: The thread that is successful is obtaining the lock will be regarded as theOwningThreadIdentifier. If, upon a lock request, it is determined that the same thread that owns the lock is asking to lock again, theRecursionQueueLength will be incremented. It is thereafter neccessary for theOwningThread to release the semaphore until theRecursionQueueLength returns to zero (0). All other callers will block or not based on their lock call disposition.
Constructor & Destructor Documentation
corelinux::MutexSemaphore::MutexSemaphore (SemaphoreGroupPtr, SemaphoreIdentifierRef, bool AutoLock = false, bool Recursive = true, bool Balking = false) throw ( NullPointerException )
Default constructor requires the identifier of the semaphore in the semaphore group. Parameters:
SemaphoreGroup pointer to the owning SemaphoreGroup
SemaphoreIdentifier The identifier for the Semaphore from the SemaphoreGroup
bool true if autolock on creation
bool true if recursion enabled
bool true if balking enabled
History
- Debian 3.1 (Sarge): the text shown here
- Debian 3.0 (Woody)