Enforce TLS_MODEL attribute.
Caught by @zoulasc in #1460. The attribute needs to be added in the headers as well.
This commit is contained in:
parent
21cfe59ff7
commit
1aabab5fdc
@ -3,8 +3,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#define JEMALLOC_INTERNAL_TSD_MALLOC_THREAD_CLEANUP_H
|
#define JEMALLOC_INTERNAL_TSD_MALLOC_THREAD_CLEANUP_H
|
||||||
|
|
||||||
extern __thread tsd_t tsd_tls;
|
#define JEMALLOC_TSD_TYPE_ATTR(type) __thread type JEMALLOC_TLS_MODEL
|
||||||
extern __thread bool tsd_initialized;
|
|
||||||
|
extern JEMALLOC_TSD_TYPE_ATTR(tsd_t) tsd_tls;
|
||||||
|
extern JEMALLOC_TSD_TYPE_ATTR(bool) tsd_initialized;
|
||||||
extern bool tsd_booted;
|
extern bool tsd_booted;
|
||||||
|
|
||||||
/* Initialization/cleanup. */
|
/* Initialization/cleanup. */
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#define JEMALLOC_INTERNAL_TSD_TLS_H
|
#define JEMALLOC_INTERNAL_TSD_TLS_H
|
||||||
|
|
||||||
extern __thread tsd_t tsd_tls;
|
#define JEMALLOC_TSD_TYPE_ATTR(type) __thread type JEMALLOC_TLS_MODEL
|
||||||
|
|
||||||
|
extern JEMALLOC_TSD_TYPE_ATTR(tsd_t) tsd_tls;
|
||||||
extern pthread_key_t tsd_tsd;
|
extern pthread_key_t tsd_tsd;
|
||||||
extern bool tsd_booted;
|
extern bool tsd_booted;
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@ JEMALLOC_DIAGNOSTIC_PUSH
|
|||||||
JEMALLOC_DIAGNOSTIC_IGNORE_MISSING_STRUCT_FIELD_INITIALIZERS
|
JEMALLOC_DIAGNOSTIC_IGNORE_MISSING_STRUCT_FIELD_INITIALIZERS
|
||||||
|
|
||||||
#ifdef JEMALLOC_MALLOC_THREAD_CLEANUP
|
#ifdef JEMALLOC_MALLOC_THREAD_CLEANUP
|
||||||
__thread tsd_t JEMALLOC_TLS_MODEL tsd_tls = TSD_INITIALIZER;
|
JEMALLOC_TSD_TYPE_ATTR(tsd_t) tsd_tls = TSD_INITIALIZER;
|
||||||
__thread bool JEMALLOC_TLS_MODEL tsd_initialized = false;
|
JEMALLOC_TSD_TYPE_ATTR(bool) JEMALLOC_TLS_MODEL tsd_initialized = false;
|
||||||
bool tsd_booted = false;
|
bool tsd_booted = false;
|
||||||
#elif (defined(JEMALLOC_TLS))
|
#elif (defined(JEMALLOC_TLS))
|
||||||
__thread tsd_t JEMALLOC_TLS_MODEL tsd_tls = TSD_INITIALIZER;
|
JEMALLOC_TSD_TYPE_ATTR(tsd_t) tsd_tls = TSD_INITIALIZER;
|
||||||
pthread_key_t tsd_tsd;
|
pthread_key_t tsd_tsd;
|
||||||
bool tsd_booted = false;
|
bool tsd_booted = false;
|
||||||
#elif (defined(_WIN32))
|
#elif (defined(_WIN32))
|
||||||
|
Loading…
Reference in New Issue
Block a user