diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2017-01-20 00:22:57 +0300 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-01-20 00:22:57 +0300 |
commit | 0893676f65845428cce02e71871b34ad7b676fd8 (patch) | |
tree | f3a35b5e2e2e40e541d3da0aaa5eb33372eb0a6b /src/Native/Runtime/startup.cpp | |
parent | 6eedad45bcb621c6d26aafa4ec47d37cdbc1204e (diff) |
Enable workaround for build tools that don't support thread_local
Apple started to support thread_local in xcode starting from version 8.0,
this workaround enables the thread shutdown detection to compile even on
devices that don't have the latest xcode.
Diffstat (limited to 'src/Native/Runtime/startup.cpp')
-rw-r--r-- | src/Native/Runtime/startup.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Native/Runtime/startup.cpp b/src/Native/Runtime/startup.cpp index 8a7b0c56c..3a368191b 100644 --- a/src/Native/Runtime/startup.cpp +++ b/src/Native/Runtime/startup.cpp @@ -268,8 +268,13 @@ void __stdcall RuntimeThreadShutdown(void* thread) // that is made for the single thread that runs the final stages of orderly process // shutdown (i.e., the thread that delivers the DLL_PROCESS_DETACH notifications when the // process is being torn down via an ExitProcess call). +#if HAVE_THREAD_LOCAL + // If the current Unix platform doesn't support thread_local, we don't get the thread pointer + // as the parameter, we just get NULL, so we can check the thread validity only if the + // thread_local is supported UNREFERENCED_PARAMETER(thread); ASSERT((Thread*)thread == ThreadStore::GetCurrentThread()); +#endif if (!g_processShutdownHasStarted) { |