From ee5115ca2ce2de3ebce1d5ef10d9df1918a5572e Mon Sep 17 00:00:00 2001 From: jpk68 Date: Fri, 29 May 2026 22:55:08 +0200 Subject: [PATCH] src: remove non-standard thread extensions --- src/common/perf_timer.cpp | 4 ++-- src/common/threadpool.cpp | 4 ++-- src/crypto/rx-slow-hash.c | 2 +- src/crypto/slow-hash.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/perf_timer.cpp b/src/common/perf_timer.cpp index a7acf111b..fae0d7478 100644 --- a/src/common/perf_timer.cpp +++ b/src/common/perf_timer.cpp @@ -92,9 +92,9 @@ el::Level performance_timer_log_level = el::Level::Info; #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION #warning "Building with fuzzing mode UNSAFE FOR PRODUCTION!" - __thread std::vector *performance_timers = NULL; + thread_local std::vector *performance_timers = NULL; #else - static __thread std::vector *performance_timers = NULL; + static thread_local std::vector *performance_timers = NULL; #endif void set_performance_timer_log_level(el::Level level) diff --git a/src/common/threadpool.cpp b/src/common/threadpool.cpp index faa45e8bd..14ca5f4fb 100644 --- a/src/common/threadpool.cpp +++ b/src/common/threadpool.cpp @@ -31,8 +31,8 @@ #include "cryptonote_config.h" #include "common/util.h" -static __thread int depth = 0; -static __thread bool is_leaf = false; +static thread_local int depth = 0; +static thread_local bool is_leaf = false; namespace tools { diff --git a/src/crypto/rx-slow-hash.c b/src/crypto/rx-slow-hash.c index 1dc3eb221..f04ae553a 100644 --- a/src/crypto/rx-slow-hash.c +++ b/src/crypto/rx-slow-hash.c @@ -63,7 +63,7 @@ static int secondary_seedhash_set = 0; #if defined(_MSC_VER) #define THREADV __declspec(thread) #else -#define THREADV __thread +#define THREADV _Thread_local #endif static THREADV randomx_vm *main_vm_full = NULL; diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 47ae2dab8..863c48005 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -54,7 +54,7 @@ #if defined(_MSC_VER) #define THREADV __declspec(thread) #else -#define THREADV __thread +#define THREADV _Thread_local #endif extern void aesb_single_round(const uint8_t *in, uint8_t *out, const uint8_t *expandedKey);