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

#include "checking_thread_system.h"

Inheritance diagram for net_instaweb::CheckingThreadSystem::Mutex:
net_instaweb::ThreadSystem::CondvarCapableMutex net_instaweb::AbstractMutex

Public Member Functions

 Mutex (ThreadSystem::CondvarCapableMutex *mutex)
 
virtual bool TryLock () EXCLUSIVE_TRYLOCK_FUNCTION(true)
 Attempt to take mutex, true on success, false if held by another thread.
 
virtual void Lock () EXCLUSIVE_LOCK_FUNCTION()
 Block until mutex is available, then take the mutex.
 
virtual void Unlock () UNLOCK_FUNCTION()
 Release the mutex, permitting a blocked lock operation (if any) to proceed.
 
virtual void DCheckLocked ()
 This implementation of DCheckLocked CHECK-fails if lock is not held.
 
virtual void DCheckUnlocked ()
 This implementation of DCheckUnlocked CHECK-fails if lock is held.
 
virtual ThreadSystem::CondvarNewCondvar ()
 The condvars provided perform lock checking for ....Wait operations.
 

Friends

class CheckingCondvar
 

Detailed Description

We also expose CheckingThreadSystem::Mutex, which wraps a CondvarCapableMutex to provide checked condvars and lock checking (these two must be done together, so we must wrap the mutex from which the condvar is created and use the wrapped mutex to create the condvar). This class can be used to wrap unchecked mutexes provided by other CheckingThreadSystems.


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