28 #ifndef V8_PLATFORM_MUTEX_H_
29 #define V8_PLATFORM_MUTEX_H_
31 #include "../lazy-instance.h"
33 #include "../win32-headers.h"
79 typedef pthread_mutex_t NativeHandle;
81 typedef CRITICAL_SECTION NativeHandle;
85 return native_handle_;
88 return native_handle_;
92 NativeHandle native_handle_;
111 friend class ConditionVariable;
130 #define LAZY_MUTEX_INITIALIZER LAZY_STATIC_INSTANCE_INITIALIZER
181 return native_handle_;
184 return native_handle_;
188 NativeHandle native_handle_;
207 typedef LazyStaticInstance<RecursiveMutex,
208 DefaultConstructTrait<RecursiveMutex>,
211 #define LAZY_RECURSIVE_MUTEX_INITIALIZER LAZY_STATIC_INSTANCE_INITIALIZER
224 template <
typename Mutex>
227 explicit LockGuard(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); }
238 #endif // V8_PLATFORM_MUTEX_H_
NativeHandle & native_handle()
LazyStaticInstance< Mutex, DefaultConstructTrait< Mutex >, ThreadSafeInitOnceTrait >::type LazyMutex
Mutex::NativeHandle NativeHandle
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
const NativeHandle & native_handle() const
#define V8_WARN_UNUSED_RESULT
#define ASSERT_EQ(v1, v2)
LazyStaticInstance< RecursiveMutex, DefaultConstructTrait< RecursiveMutex >, ThreadSafeInitOnceTrait >::type LazyRecursiveMutex