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

Function thd_start

deps/jemalloc/test/unit/mtx.c:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19} thd_start_arg_t;
20
21static void *
22thd_start(void *varg) {
23 thd_start_arg_t *arg = (thd_start_arg_t *)varg;
24 unsigned i;
25
26 for (i = 0; i < NINCRS; i++) {
27 mtx_lock(&arg->mtx);
28 arg->x++;
29 mtx_unlock(&arg->mtx);
30 }
31 return NULL;
32}
33
34TEST_BEGIN(test_mtx_race) {
35 thd_start_arg_t arg;

Callers

nothing calls this directly

Calls 2

mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected