From 6c8e097bb25d343883dd292f0db2de684a35fc86 Mon Sep 17 00:00:00 2001 From: oy Date: Thu, 19 Jul 2012 10:01:57 +0200 Subject: [PATCH] fixed try_lock on windows --- src/base/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/system.c b/src/base/system.c index 1c4d3a484..f4ce8b37b 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -477,7 +477,7 @@ int lock_try(LOCK lock) #if defined(CONF_FAMILY_UNIX) return pthread_mutex_trylock((LOCKINTERNAL *)lock); #elif defined(CONF_FAMILY_WINDOWS) - return TryEnterCriticalSection((LPCRITICAL_SECTION)lock); + return !TryEnterCriticalSection((LPCRITICAL_SECTION)lock); #else #error not implemented on this platform #endif