mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-18 02:46:21 +03:00
Use MSVC __declspec(thread) for TSD on Windows
This commit is contained in:
parent
1c900088c3
commit
3a0d9cdadb
2 changed files with 78 additions and 2 deletions
|
|
@ -22,8 +22,12 @@ JEMALLOC_TSD_TYPE_ATTR(tsd_t) tsd_tls = TSD_INITIALIZER;
|
|||
pthread_key_t tsd_tsd;
|
||||
bool tsd_booted = false;
|
||||
#elif (defined(_WIN32))
|
||||
#if defined(JEMALLOC_LEGACY_WINDOWS_SUPPORT) || !defined(_MSC_VER)
|
||||
DWORD tsd_tsd;
|
||||
tsd_wrapper_t tsd_boot_wrapper = {false, TSD_INITIALIZER};
|
||||
tsd_wrapper_t tsd_boot_wrapper = {TSD_INITIALIZER, false};
|
||||
#else
|
||||
JEMALLOC_TSD_TYPE_ATTR(tsd_wrapper_t) tsd_wrapper_tls = { TSD_INITIALIZER, false };
|
||||
#endif
|
||||
bool tsd_booted = false;
|
||||
#if JEMALLOC_WIN32_TLSGETVALUE2
|
||||
TGV2 tls_get_value2 = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue