MCPcopy Create free account
hub / github.com/cppla/ServerStatus / lock_try

Function lock_try

server/src/system.c:477–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475}
476
477int lock_try(LOCK lock)
478{
479#if defined(CONF_FAMILY_UNIX)
480 return pthread_mutex_trylock((LOCKINTERNAL *)lock);
481#elif defined(CONF_FAMILY_WINDOWS)
482 return !TryEnterCriticalSection((LPCRITICAL_SECTION)lock);
483#else
484 #error not implemented on this platform
485#endif
486}
487
488void lock_wait(LOCK lock)
489{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected