#include <c4d_thread.h>
Much the same as AutoLocker but allows differentiation of read/write access.
Public Member Functions | |
AutoRWLocker () | |
AutoRWLocker (AutoRWLock &lock, Bool write_lock=true) | |
~AutoRWLocker () | |
void | DoLock (AutoRWLock &lock, Bool write_lock=true) |
void | Unlock () |
Private Member Functions | |
AutoRWLocker & | operator= (const AutoRWLocker &d) |
AutoRWLocker (AutoRWLocker &lock) | |
Private Attributes | |
maxon::RWSpinlock * | l |
volatile UInt32 * | ct |
volatile Bool | is_write |
|
private |
AutoRWLocker | ( | ) |
Default constructor.
|
explicit |
Locks the passed AutoRWLock.
[in] | lock | The AutoRWLock to lock. |
[in] | write_lock | true for write access, false for read access only. |
~AutoRWLocker | ( | ) |
Destructor.
|
private |
void DoLock | ( | AutoRWLock & | lock, |
Bool | write_lock = true |
||
) |
Locks the passed AutoRWLock.
[in] | lock | The AutoRWLock to lock. |
[in] | write_lock | true for write access, false for read access only. |
void Unlock | ( | ) |
Unlocks the locked AutoRWLock.
|
private |
|
private |
|
private |