Page Speed Optimization Libraries
1.13.35.1
|
#include "checking_thread_system.h"
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::Condvar * | NewCondvar () |
The condvars provided perform lock checking for ....Wait operations. | |
Friends | |
class | CheckingCondvar |
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.