28 #ifndef V8_PLATFORM_SEMAPHORE_H_
29 #define V8_PLATFORM_SEMAPHORE_H_
31 #include "../lazy-instance.h"
33 #include "../win32-headers.h"
37 #include <mach/semaphore.h>
59 explicit Semaphore(
int count);
76 typedef semaphore_t NativeHandle;
78 typedef sem_t NativeHandle;
80 typedef HANDLE NativeHandle;
84 return native_handle_;
87 return native_handle_;
91 NativeHandle native_handle_;
110 return new Semaphore(
N);
122 #define LAZY_SEMAPHORE_INITIALIZER LAZY_DYNAMIC_INSTANCE_INITIALIZER
126 #endif // V8_PLATFORM_SEMAPHORE_H_
static Semaphore * Create()
void Signal(const v8::FunctionCallbackInfo< v8::Value > &args)
LazyDynamicInstance< Semaphore, CreateSemaphoreTrait< N >, ThreadSafeInitOnceTrait >::type type
NativeHandle & native_handle()
typedef HANDLE(__stdcall *DLL_FUNC_TYPE(CreateToolhelp32Snapshot))(DWORD dwFlags
Mutex::NativeHandle NativeHandle
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
const NativeHandle & native_handle() const
#define V8_WARN_UNUSED_RESULT