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

Public Member Functions | Protected Member Functions | Protected Attributes

util::AutoWriteLock Class Reference

#include <AutoLock.h>

Inheritance diagram for util::AutoWriteLock:
Inheritance graph
Collaboration diagram for util::AutoWriteLock:
Collaboration graph

List of all members.

Public Member Functions

void acquire ()
void attach (LockHandle &aHandle)
void attach (const Lockable &aLockable)
void attach (const Lockable *aLockable)
void attach (LockHandle *aHandle)
 AutoWriteLock (const Lockable &aLockable COMMA_LOCKVAL_SRC_POS_DECL)
 AutoWriteLock (LockHandle *aHandle COMMA_LOCKVAL_SRC_POS_DECL)
 AutoWriteLock (LockHandle &aHandle COMMA_LOCKVAL_SRC_POS_DECL)
 AutoWriteLock (const Lockable *aLockable COMMA_LOCKVAL_SRC_POS_DECL)
void enter ()
bool isWriteLockOnCurrentThread () const
void leave ()
void release ()
uint32_t writeLockLevel () const
virtual ~AutoWriteLock ()

Protected Member Functions

virtual void callLockImpl (LockHandle &l)
void callLockOnAllHandles ()
virtual void callUnlockImpl (LockHandle &l)
void callUnlockOnAllHandles ()
void cleanup ()

Protected Attributes


Detailed Description

Automatic write lock. Use this with a RWLockHandle to request a read/write semaphore in write mode. There can only ever be one writer of a read/write semaphore: while the lock is held in write mode, no other writer or reader can request the semaphore and will block.

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

When used with a WriteLockHandle, it requests the semaphore contained therein exclusively.

Definition at line 453 of file AutoLock.h.

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

Generated by  Doxygen 1.6.0   Back to index