1 1.1 christos #ifndef JEMALLOC_INTERNAL_BACKGROUND_THREAD_EXTERNS_H 2 1.1 christos #define JEMALLOC_INTERNAL_BACKGROUND_THREAD_EXTERNS_H 3 1.1 christos 4 1.1 christos extern bool opt_background_thread; 5 1.1 christos extern size_t opt_max_background_threads; 6 1.1 christos extern malloc_mutex_t background_thread_lock; 7 1.1 christos extern atomic_b_t background_thread_enabled_state; 8 1.1 christos extern size_t n_background_threads; 9 1.1 christos extern size_t max_background_threads; 10 1.1 christos extern background_thread_info_t *background_thread_info; 11 1.1 christos extern bool can_enable_background_thread; 12 1.1 christos 13 1.1 christos bool background_thread_create(tsd_t *tsd, unsigned arena_ind); 14 1.1 christos bool background_threads_enable(tsd_t *tsd); 15 1.1 christos bool background_threads_disable(tsd_t *tsd); 16 1.1 christos void background_thread_interval_check(tsdn_t *tsdn, arena_t *arena, 17 1.1 christos arena_decay_t *decay, size_t npages_new); 18 1.1 christos void background_thread_prefork0(tsdn_t *tsdn); 19 1.1 christos void background_thread_prefork1(tsdn_t *tsdn); 20 1.1 christos void background_thread_postfork_parent(tsdn_t *tsdn); 21 1.1 christos void background_thread_postfork_child(tsdn_t *tsdn); 22 1.1 christos bool background_thread_stats_read(tsdn_t *tsdn, 23 1.1 christos background_thread_stats_t *stats); 24 1.1 christos void background_thread_ctl_init(tsdn_t *tsdn); 25 1.1 christos 26 1.1 christos #ifdef JEMALLOC_PTHREAD_CREATE_WRAPPER 27 1.1 christos extern int pthread_create_wrapper(pthread_t *__restrict, const pthread_attr_t *, 28 1.1 christos void *(*)(void *), void *__restrict); 29 1.1 christos #endif 30 1.1 christos bool background_thread_boot0(void); 31 1.1 christos bool background_thread_boot1(tsdn_t *tsdn); 32 1.1 christos 33 1.1 christos #endif /* JEMALLOC_INTERNAL_BACKGROUND_THREAD_EXTERNS_H */ 34