fixed try_lock on windows

This commit is contained in:
oy 2012-07-19 10:01:57 +02:00
parent f7f7e8e99a
commit 3a0b017619

View file

@ -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