Commit 46485a0b by Nicolas Capens Committed by Nicolas Capens

Don't assert thread_local initialization

Initialization of thread_local variables in shared libraries might be implementation dependent. Just keep the assert for Win32. https://docs.microsoft.com/en-us/cpp/cpp/thread?view=vs-2019 states that "Thread-local variables that are initialized statically with constant values are generally initialized properly on all threads." Bug: b/157525646 Change-Id: Ifb6a77e085c0f21f13af58c89050868992928300 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45809 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 763957e6
...@@ -902,7 +902,9 @@ Nucleus::Nucleus() ...@@ -902,7 +902,9 @@ Nucleus::Nucleus()
::routine = elfMemory; ::routine = elfMemory;
} }
#if defined(_WIN32) // TODO(b/157525646): Initialization of thread_local variables in shared libraries may not be supported on all platforms.
ASSERT(Variable::unmaterializedVariables == nullptr); ASSERT(Variable::unmaterializedVariables == nullptr);
#endif
Variable::unmaterializedVariables = new std::unordered_set<const Variable *>(); Variable::unmaterializedVariables = new std::unordered_set<const Variable *>();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment