sbAutoReadLock Class Reference

#include <sbAutoRWLock.h>

Public Member Functions

 sbAutoReadLock (PRRWLock *aLock)
 
 ~sbAutoReadLock (void)
 
void lock ()
 
void unlock ()
 

Detailed Description

sbAutoReadLock Stack-based read locking object for PRRWLock.

Definition at line 38 of file sbAutoRWLock.h.

Constructor & Destructor Documentation

sbAutoReadLock::sbAutoReadLock ( PRRWLock *  aLock)
inline

Constructor The constructor aquires the given lock for reading. The destructor releases the lock.

Parameters
aLockA valid PRRWLock* returned from the NSPR's PR_NewRWLock() function.

Definition at line 68 of file sbAutoRWLock.h.

sbAutoReadLock::~sbAutoReadLock ( void  )
inline

Definition at line 78 of file sbAutoRWLock.h.

Member Function Documentation

void sbAutoReadLock::lock ( )
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.

void sbAutoReadLock::unlock ( )
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.


The documentation for this class was generated from the following file: