mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed try_lock on windows
This commit is contained in:
parent
521eaf038b
commit
6c8e097bb2
|
@ -477,7 +477,7 @@ int lock_try(LOCK lock)
|
||||||
#if defined(CONF_FAMILY_UNIX)
|
#if defined(CONF_FAMILY_UNIX)
|
||||||
return pthread_mutex_trylock((LOCKINTERNAL *)lock);
|
return pthread_mutex_trylock((LOCKINTERNAL *)lock);
|
||||||
#elif defined(CONF_FAMILY_WINDOWS)
|
#elif defined(CONF_FAMILY_WINDOWS)
|
||||||
return TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
|
return !TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
|
||||||
#else
|
#else
|
||||||
#error not implemented on this platform
|
#error not implemented on this platform
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue