2017-01-11 10:06:31 +08:00
|
|
|
#ifndef JEMALLOC_INTERNAL_MUTEX_EXTERNS_H
|
|
|
|
#define JEMALLOC_INTERNAL_MUTEX_EXTERNS_H
|
|
|
|
|
2017-04-27 09:37:44 +08:00
|
|
|
#include "jemalloc/internal/tsd_types.h"
|
|
|
|
|
2017-01-11 10:06:31 +08:00
|
|
|
#ifdef JEMALLOC_LAZY_LOCK
|
|
|
|
extern bool isthreaded;
|
|
|
|
#else
|
|
|
|
# undef isthreaded /* Undo private_namespace.h definition. */
|
|
|
|
# define isthreaded true
|
|
|
|
#endif
|
|
|
|
|
|
|
|
bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name,
|
|
|
|
witness_rank_t rank);
|
|
|
|
void malloc_mutex_prefork(tsdn_t *tsdn, malloc_mutex_t *mutex);
|
|
|
|
void malloc_mutex_postfork_parent(tsdn_t *tsdn, malloc_mutex_t *mutex);
|
|
|
|
void malloc_mutex_postfork_child(tsdn_t *tsdn, malloc_mutex_t *mutex);
|
|
|
|
bool malloc_mutex_boot(void);
|
2017-03-14 08:29:03 +08:00
|
|
|
void malloc_mutex_prof_data_reset(tsdn_t *tsdn, malloc_mutex_t *mutex);
|
2017-01-11 10:06:31 +08:00
|
|
|
|
|
|
|
#endif /* JEMALLOC_INTERNAL_MUTEX_EXTERNS_H */
|