diff options
author | Steve MacLean <Steve.MacLean@Microsoft.com> | 2020-05-21 13:34:26 -0400 |
---|---|---|
committer | Steve MacLean <Steve.MacLean@Microsoft.com> | 2020-05-21 17:59:52 -0400 |
commit | d627f4aea024f7d1bfaa7ce7293379316c7713ea (patch) | |
tree | 071e0b29d8ab3198d09c0b6b7d664a7d1786c05a /src/x86_64 | |
parent | 8321b7820096c44750cf5360654dcaae99827439 (diff) | |
download | libunwind-d627f4aea024f7d1bfaa7ce7293379316c7713ea.tar.gz |
Use C11 _Thread_local
Diffstat (limited to 'src/x86_64')
-rw-r--r-- | src/x86_64/Ginit.c | 6 | ||||
-rw-r--r-- | src/x86_64/Gtrace.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c index 81c663c1..250ead4a 100644 --- a/src/x86_64/Ginit.c +++ b/src/x86_64/Ginit.c @@ -203,10 +203,10 @@ tdep_init_mem_validate (void) /* Cache of already validated addresses */ #define NLGA 4 -#if defined(HAVE___THREAD) && HAVE___THREAD +#if defined(HAVE___CACHE_PER_THREAD) && HAVE___CACHE_PER_THREAD // thread-local variant -static THREAD_LOCAL unw_word_t last_good_addr[NLGA]; -static THREAD_LOCAL int lga_victim; +static _Thread_local unw_word_t last_good_addr[NLGA]; +static _Thread_local int lga_victim; static int is_cached_valid_mem(unw_word_t addr) diff --git a/src/x86_64/Gtrace.c b/src/x86_64/Gtrace.c index 7be10a00..40be17eb 100644 --- a/src/x86_64/Gtrace.c +++ b/src/x86_64/Gtrace.c @@ -50,8 +50,8 @@ static pthread_once_t trace_cache_once = PTHREAD_ONCE_INIT; static sig_atomic_t trace_cache_once_happen; static pthread_key_t trace_cache_key; static struct mempool trace_cache_pool; -static THREAD_LOCAL unw_trace_cache_t *tls_cache; -static THREAD_LOCAL int tls_cache_destroyed; +static _Thread_local unw_trace_cache_t *tls_cache; +static _Thread_local int tls_cache_destroyed; /* Free memory for a thread's trace cache. */ static void |