Apple-clang seems to support now the standard thread_local variables

This commit is contained in:
Joachim Schöberl 2019-10-28 12:18:12 +01:00
parent d12372f27d
commit d0864b9901
2 changed files with 8 additions and 8 deletions

View File

@ -35,11 +35,11 @@ namespace ngcore
int TaskManager :: num_threads = 1;
#ifndef __clang__
// #ifndef __clang__
thread_local int TaskManager :: thread_id = 0;
#else
__thread int TaskManager :: thread_id;
#endif
// #else
// __thread int TaskManager :: thread_id;
// #endif
const function<void(TaskInfo&)> * TaskManager::func;
const function<void()> * TaskManager::startup_function = nullptr;

View File

@ -72,11 +72,11 @@ namespace ngcore
#ifndef __clang__
// #ifndef __clang__
static thread_local int thread_id;
#else
static __thread int thread_id;
#endif
// #else
// static __thread int thread_id;
// #endif
NGCORE_API static bool use_paje_trace;
public: