Commit 98ad599b authored by Simon Marlow's avatar Simon Marlow

fix TRY_ACQUIRE_LOCK on Windows.

parent c9629e9f
......@@ -126,7 +126,7 @@ typedef CRITICAL_SECTION Mutex;
#else
#define ACQUIRE_LOCK(mutex) EnterCriticalSection(mutex)
#define TRY_ACQUIRE_LOCK(mutex) (TryEnterCriticalSection(mutex) != 0)
#define TRY_ACQUIRE_LOCK(mutex) (TryEnterCriticalSection(mutex) == 0)
#define RELEASE_LOCK(mutex) LeaveCriticalSection(mutex)
// I don't know how to do this. TryEnterCriticalSection() doesn't do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment