Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::PthreadRWLock Class Reference

Implementation of RWLock for Pthread mutexes. More...

#include "pthread_rw_lock.h"

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

Public Member Functions

virtual bool TryLock ()
 Attempt to take mutex, true on success, false if held by another thread.
virtual void Lock ()
 Block until mutex is available, then take the mutex.
virtual void Unlock ()
 Release the mutex, permitting a blocked lock operation (if any) to proceed.
virtual bool ReaderTryLock ()
virtual void ReaderLock ()
 Block until this Mutex is free, or shared, then acquire a share of it.
virtual void ReaderUnlock ()
 Release a read share of this Mutex.
- Public Member Functions inherited from net_instaweb::ThreadSystem::RWLock
virtual void DCheckReaderLocked ()
- Public Member Functions inherited from net_instaweb::AbstractMutex
virtual void DCheckLocked ()
virtual void DCheckUnlocked ()

Detailed Description

Implementation of RWLock for Pthread mutexes.

Member Function Documentation

virtual bool net_instaweb::PthreadRWLock::ReaderTryLock ( )

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. Try to acquire a read share of this lock without blocking.

Implements net_instaweb::ThreadSystem::RWLock.

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