19 #ifndef PAGESPEED_KERNEL_BASE_CHECKING_THREAD_SYSTEM_H_
20 #define PAGESPEED_KERNEL_BASE_CHECKING_THREAD_SYSTEM_H_
28 #include "pagespeed/kernel/base/thread_annotations.h"
30 namespace net_instaweb {
47 class CheckingCondvar;
60 virtual bool TryLock() EXCLUSIVE_TRYLOCK_FUNCTION(
true);
61 virtual void Lock() EXCLUSIVE_LOCK_FUNCTION();
62 virtual void Unlock() UNLOCK_FUNCTION();
64 virtual void DCheckLocked();
67 virtual void DCheckUnlocked();
73 friend class CheckingCondvar;
74 void TakeLockControl();
75 void DropLockControl();
91 virtual bool TryLock() EXCLUSIVE_TRYLOCK_FUNCTION(
true);
92 virtual void Lock() EXCLUSIVE_LOCK_FUNCTION();
93 virtual void Unlock() UNLOCK_FUNCTION();
94 virtual bool ReaderTryLock() SHARED_TRYLOCK_FUNCTION(
true);
95 virtual void ReaderLock() SHARED_LOCK_FUNCTION();
96 virtual void ReaderUnlock() UNLOCK_FUNCTION();
99 virtual void DCheckLocked();
100 virtual void DCheckReaderLocked();
103 void TakeLockControl();
104 void DropLockControl();
105 void TakeReaderLockControl();
106 void DropReaderLockControl();
114 : thread_system_(thread_system) { }
121 return thread_system_->GetThreadId();
127 virtual ThreadImpl* NewThreadImpl(Thread* wrapper, ThreadFlags flags);
Definition: atomic_bool.h:31
Definition: atomic_int32.h:72
virtual ThreadId * GetThreadId() const
Definition: checking_thread_system.h:120
Definition: checking_thread_system.h:86
Definition: thread_system.h:46
virtual Mutex * NewMutex()
Definition: scoped_ptr.h:30
Definition: checking_thread_system.h:55
Definition: thread_system.h:61
virtual RWLock * NewRWLock()
Definition: thread_system.h:40
Definition: thread_system.h:116
Timer interface, made virtual so it can be mocked for tests.
Definition: timer.h:27
Definition: checking_thread_system.h:42
virtual Timer * NewTimer()