ULLock is an abstract class describing a simple mutual exclusion primitive. Each operating system or environment will require a different implementation.
More...
#include <ullock.h>
ULLock is an abstract class describing a simple mutual exclusion primitive. Each operating system or environment will require a different implementation.
virtual ULLock::~ULLock |
( |
| ) |
|
|
inlinevirtual |
virtual void ULLock::claim |
( |
| ) |
|
|
pure virtual |
If this lock is currently unclaimed, the caller of claim() is granted ownership of the lock. Otherwise, the calling thread is put to sleep until the lock is released. When claim() returns, the caller has ownership of the lock. As usual with locking primitives, it's important to nest calls to claim() and release() properly so as to avoid deadlock.
virtual void ULLock::release |
( |
| ) |
|
|
pure virtual |
When called by the thread that currently has ownership of this lock, release() causes the thread to relinquish ownership. Otherwise, release() does nothing (though a good implementation of ULLock should fire an assertion in such a case).
The documentation for this class was generated from the following file: