summaryrefslogtreecommitdiff
path: root/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
diff options
context:
space:
mode:
authorDanny Lin <danny@kdrag0n.dev>2021-10-11 20:49:26 -0700
committeralk3pInjection <5e147612@kscope.ink>2022-05-08 12:40:50 +0800
commite36e52fb6ec54bc47e17e849ca5a3a301eaa6d05 (patch)
tree854d309be91bcdd38fe46ea8ad0f906bef39d017 /include/jemalloc/internal/tsd_malloc_thread_cleanup.h
parent6d4d27fd2651ed114386b89c2d251b816a849460 (diff)
parentea6b3e973b477b8061e0076bb257dbd7f3faa756 (diff)
Merge tag '5.2.1' into HEAD
Release Change-Id: I269b861cb81499b78f13dc2e88827f13ef5a207d
Diffstat (limited to 'include/jemalloc/internal/tsd_malloc_thread_cleanup.h')
-rw-r--r--include/jemalloc/internal/tsd_malloc_thread_cleanup.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/jemalloc/internal/tsd_malloc_thread_cleanup.h b/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
index beb467a6..65852d5c 100644
--- a/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
+++ b/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
@@ -3,8 +3,10 @@
#endif
#define JEMALLOC_INTERNAL_TSD_MALLOC_THREAD_CLEANUP_H
-extern __thread tsd_t tsd_tls;
-extern __thread bool tsd_initialized;
+#define JEMALLOC_TSD_TYPE_ATTR(type) __thread type JEMALLOC_TLS_MODEL
+
+extern JEMALLOC_TSD_TYPE_ATTR(tsd_t) tsd_tls;
+extern JEMALLOC_TSD_TYPE_ATTR(bool) tsd_initialized;
extern bool tsd_booted;
/* Initialization/cleanup. */
@@ -47,7 +49,6 @@ tsd_get_allocates(void) {
/* Get/set. */
JEMALLOC_ALWAYS_INLINE tsd_t *
tsd_get(bool init) {
- assert(tsd_booted);
return &tsd_tls;
}
JEMALLOC_ALWAYS_INLINE void