From 3a0b017619856050128d9c2a5c70ad45a799c10d 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 9ffe72ba8..5c9656eb6 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