27 #ifndef PAGESPEED_KERNEL_BASE_THREAD_SYSTEM_H_
28 #define PAGESPEED_KERNEL_BASE_THREAD_SYSTEM_H_
32 #include "pagespeed/kernel/base/thread_annotations.h"
34 namespace net_instaweb {
52 virtual Condvar* NewCondvar() = 0;
70 virtual bool ReaderTryLock() SHARED_TRYLOCK_FUNCTION(
true) = 0;
72 virtual void ReaderLock() SHARED_LOCK_FUNCTION() = 0;
74 virtual void ReaderUnlock() UNLOCK_FUNCTION() = 0;
78 virtual void DCheckReaderLocked();
100 lock_->ReaderUnlock();
120 virtual bool IsEqual(
const ThreadId& that)
const = 0;
121 virtual bool IsCurrentThread()
const = 0;
138 virtual CondvarCapableMutex*
NewMutex() = 0;
156 friend class MockThreadSystem;
157 friend class CheckingThreadSystem;
158 virtual ThreadImpl* NewThreadImpl(Thread* wrapper, ThreadFlags flags) = 0;
168 virtual bool StartImpl() = 0;
169 virtual void JoinImpl() = 0;
181 #define ScopedReader(x) COMPILE_ASSERT(0, mutex_lock_decl_missing_var_name)
Abstract interface for implementing a mutex.
Definition: abstract_mutex.h:28
virtual RWLock * NewRWLock()=0
void Release() UNLOCK_FUNCTION()
Definition: thread_system.h:96
Definition: thread_system.h:46
Definition: thread_system.h:61
virtual Timer * NewTimer()=0
virtual ThreadId * GetThreadId() const =0
#define ScopedReader(x)
Definition: thread_system.h:181
Definition: thread_system.h:40
Definition: thread_system.h:116
Definition: thread_system.h:89
Definition: thread_system.h:166
virtual CondvarCapableMutex * NewMutex()=0
Base class for client thread code.
Definition: thread.h:34