LMutexSemaphore is a PowerPlant class that is used for implementing a mutually-exclusive semaphore.
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
If a mutually-exclusive semaphore is raised, only one thread may access the flagged data. When the semaphore is lowered, if there are waiting threads, opnly one waiting thread is returned to the ready state.
Source files:
See also:
Purpose:
The constructor creates the object.
Access :
Prototype:
LLMutexSemaphore();
LMutexSemaphore(Boolean owned);Parameters:
Indicate whether the semaphore is already owned or not. If owned is true, the semaphore is marked as belonging to the current thread.
Purpose:
The destructor destroys the LMutexSemaphore object.
Access :
Prototype:
virtual ~LMutexSemaphore();
Purpose:
This is an override of Signal() in LSemaphore. If the owning semaphore called Wait() more than once, this function merely decrements a usage count. Else, if any threads are waiting on the semaphore, one of them is unblocked. If the current thread doesn't own the semaphore, the errSemaphoreNotOwner exception is thrown.
Purpose:
This is an override of Wait() in LSemaphore.
Purpose:
Access :
Prototype:
LThread *mOwner;
Purpose:
Access :
Prototype:
UInt32 mNestedWaits;