Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

util::AutoReadLock Class Reference

#include <AutoLock.h>

Inheritance diagram for util::AutoReadLock:


List of all members.

Detailed Description

Automatic read lock. Use this with a RWLockHandle to request a read/write semaphore in read mode. You can also use this with a WriteLockHandle but that makes little sense since they treat read mode like write mode.

If constructed with a RWLockHandle or an instance of Lockable (which in practice means any VirtualBoxBase derivative), it autoamtically requests the lock in read mode and releases the read lock in the destructor.

Definition at line 314 of file AutoLock.h.

Public Member Functions

void acquire ()
 AutoReadLock (const Lockable *aLockable COMMA_LOCKVAL_SRC_POS_DECL)
 AutoReadLock (const Lockable &aLockable COMMA_LOCKVAL_SRC_POS_DECL)
 AutoReadLock (LockHandle &aHandle COMMA_LOCKVAL_SRC_POS_DECL)
 AutoReadLock (LockHandle *aHandle COMMA_LOCKVAL_SRC_POS_DECL)
virtual void callLockImpl (LockHandle &l)
virtual void callUnlockImpl (LockHandle &l)
void release ()
virtual ~AutoReadLock ()

Protected Member Functions

void callLockOnAllHandles ()
void callUnlockOnAllHandles ()
void cleanup ()

Protected Attributes

Data * m

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

Generated by  Doxygen 1.6.0   Back to index