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

Function arena_reset_finish_background_thread

deps/jemalloc/src/ctl.c:2171–2184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2169}
2170
2171static void
2172arena_reset_finish_background_thread(tsd_t *tsd, unsigned arena_ind) {
2173 if (have_background_thread) {
2174 if (background_thread_enabled()) {
2175 background_thread_info_t *info =
2176 background_thread_info_get(arena_ind);
2177 assert(info->state == background_thread_paused);
2178 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx);
2179 info->state = background_thread_started;
2180 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx);
2181 }
2182 malloc_mutex_unlock(tsd_tsdn(tsd), &background_thread_lock);
2183 }
2184}
2185
2186static int
2187arena_i_reset_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp,

Callers 2

arena_i_reset_ctlFunction · 0.70
arena_i_destroy_ctlFunction · 0.70

Calls 4

malloc_mutex_lockFunction · 0.50
tsd_tsdnFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by

no test coverage detected