Invert NO_TLS to JEMALLOC_TLS.

This commit is contained in:
Jason Evans
2012-03-19 10:21:17 -07:00
parent f3e139a1ef
commit e24c7af35d
9 changed files with 28 additions and 28 deletions

View File

@@ -357,7 +357,7 @@ extern unsigned ncpus;
extern malloc_mutex_t arenas_lock; /* Protects arenas initialization. */
extern pthread_key_t arenas_tsd;
#ifndef NO_TLS
#ifdef JEMALLOC_TLS
/*
* Map of pthread_self() --> arenas[???], used for selecting an arena to use
* for allocations.
@@ -382,7 +382,7 @@ extern __thread arena_t *arenas_tls JEMALLOC_ATTR(tls_model("initial-exec"));
extern arena_t **arenas;
extern unsigned narenas;
#ifndef NO_TLS
#ifdef JEMALLOC_TLS
extern __thread thread_allocated_t thread_allocated_tls;
# define ALLOCATED_GET() (thread_allocated_tls.allocated)
# define ALLOCATEDP_GET() (&thread_allocated_tls.allocated)

View File

@@ -180,7 +180,7 @@ extern uint64_t prof_interval;
extern bool prof_promote;
/* Thread-specific backtrace cache, used to reduce bt2ctx contention. */
#ifndef NO_TLS
#ifdef JEMALLOC_TLS
extern __thread prof_tdata_t *prof_tdata_tls
JEMALLOC_ATTR(tls_model("initial-exec"));
# define PROF_TCACHE_GET() prof_tdata_tls

View File

@@ -76,7 +76,7 @@ extern ssize_t opt_lg_tcache_max;
extern tcache_bin_info_t *tcache_bin_info;
/* Map of thread-specific caches. */
#ifndef NO_TLS
#ifdef JEMALLOC_TLS
extern __thread tcache_t *tcache_tls
JEMALLOC_ATTR(tls_model("initial-exec"));
# define TCACHE_GET() tcache_tls

View File

@@ -122,7 +122,7 @@
#undef STATIC_PAGE_SHIFT
/* TLS is used to map arenas and magazine caches to threads. */
#undef NO_TLS
#undef JEMALLOC_TLS
/*
* JEMALLOC_IVSALLOC enables ivsalloc(), which verifies that pointers reside