diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arena.c | 1 | ||||
-rw-r--r-- | src/base.c | 1 | ||||
-rw-r--r-- | src/ctl.c | 1 | ||||
-rw-r--r-- | src/extent.c | 1 | ||||
-rw-r--r-- | src/jemalloc.c | 1 | ||||
-rw-r--r-- | src/large.c | 1 | ||||
-rw-r--r-- | src/mutex_pool.c | 2 | ||||
-rw-r--r-- | src/prof.c | 1 | ||||
-rw-r--r-- | src/rtree.c | 1 | ||||
-rw-r--r-- | src/stats.c | 1 | ||||
-rw-r--r-- | src/tcache.c | 1 | ||||
-rw-r--r-- | src/tsd.c | 12 |
12 files changed, 24 insertions, 0 deletions
diff --git a/src/arena.c b/src/arena.c index 35b4e5a..bc8fd28 100644 --- a/src/arena.c +++ b/src/arena.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/util.h" @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/mutex.h" /******************************************************************************/ /* Data. */ @@ -4,6 +4,7 @@ #include "jemalloc/internal/assert.h" #include "jemalloc/internal/ctl.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/nstime.h" #include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/util.h" diff --git a/src/extent.c b/src/extent.c index ff09f7f..fee8198 100644 --- a/src/extent.c +++ b/src/extent.c @@ -4,6 +4,7 @@ #include "jemalloc/internal/assert.h" #include "jemalloc/internal/ph.h" +#include "jemalloc/internal/mutex.h" /******************************************************************************/ /* Data. */ diff --git a/src/jemalloc.c b/src/jemalloc.c index f083adc..517fbb9 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -7,6 +7,7 @@ #include "jemalloc/internal/ctl.h" #include "jemalloc/internal/jemalloc_internal_types.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/spin.h" #include "jemalloc/internal/ticker.h" diff --git a/src/large.c b/src/large.c index ed73dc2..55ee352 100644 --- a/src/large.c +++ b/src/large.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/util.h" /******************************************************************************/ diff --git a/src/mutex_pool.c b/src/mutex_pool.c index 004d6d0..95a4573 100644 --- a/src/mutex_pool.c +++ b/src/mutex_pool.c @@ -3,6 +3,8 @@ #include "jemalloc/internal/jemalloc_preamble.h" #include "jemalloc/internal/jemalloc_internal_includes.h" +#include "jemalloc/internal/mutex.h" + bool mutex_pool_init(mutex_pool_t *pool, const char *name, witness_rank_t rank) { for (int i = 0; i < MUTEX_POOL_SIZE; ++i) { @@ -6,6 +6,7 @@ #include "jemalloc/internal/ckh.h" #include "jemalloc/internal/hash.h" #include "jemalloc/internal/malloc_io.h" +#include "jemalloc/internal/mutex.h" /******************************************************************************/ diff --git a/src/rtree.c b/src/rtree.c index 637853c..53702cf 100644 --- a/src/rtree.c +++ b/src/rtree.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/mutex.h" /* * Only the most significant bits of keys passed to rtree_{read,write}() are diff --git a/src/stats.c b/src/stats.c index fd10816..b67d46d 100644 --- a/src/stats.c +++ b/src/stats.c @@ -4,6 +4,7 @@ #include "jemalloc/internal/assert.h" #include "jemalloc/internal/ctl.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/mutex_prof.h" const char *global_mutex_names[mutex_prof_num_global_mutexes] = { diff --git a/src/tcache.c b/src/tcache.c index 4bb2fb8..96ebe67 100644 --- a/src/tcache.c +++ b/src/tcache.c @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/mutex.h" #include "jemalloc/internal/size_classes.h" /******************************************************************************/ @@ -3,6 +3,7 @@ #include "jemalloc/internal/jemalloc_internal_includes.h" #include "jemalloc/internal/assert.h" +#include "jemalloc/internal/mutex.h" /******************************************************************************/ /* Data. */ @@ -23,6 +24,17 @@ DWORD tsd_tsd; tsd_wrapper_t tsd_boot_wrapper = {false, TSD_INITIALIZER}; bool tsd_booted = false; #else + +/* + * This contains a mutex, but it's pretty convenient to allow the mutex code to + * have a dependency on tsd. So we define the struct here, and only refer to it + * by pointer in the header. + */ +struct tsd_init_head_s { + ql_head(tsd_init_block_t) blocks; + malloc_mutex_t lock; +}; + pthread_key_t tsd_tsd; tsd_init_head_t tsd_init_head = { ql_head_initializer(blocks), |