net_instaweb::CheckingThreadSystem::RWLock Class Reference

#include "checking_thread_system.h"

Inheritance diagram for net_instaweb::CheckingThreadSystem::RWLock:
net_instaweb::ThreadSystem::RWLock net_instaweb::AbstractMutex

List of all members.

Public Member Functions

 RWLock (ThreadSystem::RWLock *lock)
virtual void Lock ()
virtual void Unlock ()
virtual void ReaderLock ()
virtual void ReaderUnlock ()
 Release a read share of this Mutex.
virtual void DCheckLocked ()
 This implementation of DCheckLocked CHECK-fails if lock is not held.
virtual void DCheckReaderLocked ()

Detailed Description

We also expose CheckingThreadSystem::RWLock, which wraps a RWLock to provide read/write capable locks. This class can be used to wrap unchecked mutexes provided by other CheckingThreadSystems.


Member Function Documentation

virtual void net_instaweb::CheckingThreadSystem::RWLock::DCheckReaderLocked (  )  [virtual]

Optionally checks that reader lock is held (for invariant checking purposes). Default implementation does no checking.

Reimplemented from net_instaweb::ThreadSystem::RWLock.

virtual void net_instaweb::CheckingThreadSystem::RWLock::ReaderLock (  )  [virtual]

ReaderLock/Unlock are different from normal locks. Reader locks are shared while normal locks are exclusive. Normal lock cannot happen when reader has a lock. Block until this Mutex is free, or shared, then acquire a share of it.

Implements net_instaweb::ThreadSystem::RWLock.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:34:08 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3