#include <sbAutoRWLock.h>
Public Member Functions | |
sbAutoReadLock (PRRWLock *aLock) | |
~sbAutoReadLock (void) | |
void | lock () |
void | unlock () |
sbAutoReadLock Stack-based read locking object for PRRWLock.
Definition at line 38 of file sbAutoRWLock.h.
|
inline |
Constructor The constructor aquires the given lock for reading. The destructor releases the lock.
aLock | A valid PRRWLock* returned from the NSPR's PR_NewRWLock() function. |
Definition at line 68 of file sbAutoRWLock.h.
|
inline |
Definition at line 78 of file sbAutoRWLock.h.
|
inline |
lock Client may call this to reaquire the given lock. Take special note that attempting to aquire a locked lock will hang or crash.
Definition at line 88 of file sbAutoRWLock.h.
|
inline |
unlock Client may call this to release the given lock. Take special note unlocking an unlocked lock has undefined results.
Definition at line 100 of file sbAutoRWLock.h.