sync: add semaphore implementation

[SVN r85673]
This commit is contained in:
Tim Blechmann
2013-09-15 10:46:54 +00:00
parent 6a98633c6c
commit 79bce0a5f2

View File

@@ -46,6 +46,12 @@ namespace win32
using ::WaitForMultipleObjects; using ::WaitForMultipleObjects;
using ::WaitForSingleObject; using ::WaitForSingleObject;
using ::QueueUserAPC; using ::QueueUserAPC;
static const DWORD_ wait_abandoned = WAIT_ABANDONED;
static const DWORD_ wait_object_0 = WAIT_OBJECT_0;
static const DWORD_ wait_timeout = WAIT_TIMEOUT;
static const DWORD_ wait_failed = WAIT_FAILED;
#else #else
extern "C" { extern "C" {
struct CRITICAL_SECTION_ struct CRITICAL_SECTION_
@@ -115,6 +121,12 @@ extern "C" {
# else # else
using ::SetEvent; using ::SetEvent;
using ::ResetEvent; using ::ResetEvent;
static const DWORD_ wait_abandoned = 0x00000080L;
static const DWORD_ wait_object_0 = 0x00000000L;
static const DWORD_ wait_timeout = 0x00000102L;
static const DWORD_ wait_failed = (DWORD_)0xFFFFFFFF;
# endif # endif
} }
#endif #endif