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

util::WriteLockHandle Class Reference

#include <AutoLock.h>

Inheritance diagram for util::WriteLockHandle:

util::LockHandle util::ReadLockOps util::WriteLockOps util::LockOps util::LockOps

List of all members.


Detailed Description

Write-only semaphore handle implementation.

This is an auxiliary base class for classes that need write-only (exclusive) locking and do not need read (shared) locking. This implementation uses a cheap and fast critical section for both lockWrite() and lockRead() methods which makes a lockRead() call fully equivalent to the lockWrite() call and therefore makes it pointless to use instahces of this class with AutoReadLock instances -- shared locking will not be possible anyway and any call to lock() will block if there are lock owners on other threads.

Use with care only when absolutely sure that shared locks are not necessary.

Definition at line 246 of file AutoLock.h.


Public Member Functions

bool isWriteLockOnCurrentThread () const
LockOpsrlock ()
LockOpswlock ()

Protected Member Functions

void lock ()
void lock ()
void unlock ()
void unlock ()

Private Member Functions

void lockRead ()
void lockWrite ()
void unlockRead ()
void unlockWrite ()
uint32_t writeLockLevel () const

Private Attributes

RTCRITSECT mCritSect

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

Generated by  Doxygen 1.6.0   Back to index