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

Function background_thread_ctl_init

deps/jemalloc/src/background_thread.c:867–874  ·  view source on GitHub ↗

* When lazy lock is enabled, we need to make sure setting isthreaded before * taking any background_thread locks. This is called early in ctl (instead of * wait for the pthread_create calls to trigger) because the mutex is required * before creating background threads. */

Source from the content-addressed store, hash-verified

865 * before creating background threads.
866 */
867void
868background_thread_ctl_init(tsdn_t *tsdn) {
869 malloc_mutex_assert_not_owner(tsdn, &background_thread_lock);
870#ifdef JEMALLOC_PTHREAD_CREATE_WRAPPER
871 pthread_create_fptr_init();
872 pthread_create_wrapper_init();
873#endif
874}
875
876#endif /* defined(JEMALLOC_BACKGROUND_THREAD) */
877

Callers 4

malloc_init_hardFunction · 0.70
ctl.cFile · 0.70

Calls 3

pthread_create_fptr_initFunction · 0.85

Tested by

no test coverage detected