MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / mtx_lock

Function mtx_lock

deps/jemalloc/test/src/mtx.c:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void
42mtx_lock(mtx_t *mtx) {
43#ifdef _WIN32
44 EnterCriticalSection(&mtx->lock);
45#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
46 os_unfair_lock_lock(&mtx->lock);
47#else
48 pthread_mutex_lock(&mtx->lock);
49#endif
50}
51
52void
53mtx_unlock(mtx_t *mtx) {

Callers 2

mtx.cFile · 0.50
thd_startFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected