diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-05-14 20:55:52 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-05-14 20:55:52 +0000 |
commit | c048b6c4cd1025ae8144ea77b3ed7c43edb1c153 (patch) | |
tree | 1d57b8bcc51d306038d80549aa2b9a03d762064d /llvm/lib/Support/Threading.cpp | |
parent | 23a66e45ed7b8b6b6759b3b8b0dea32e9b481ee8 (diff) | |
download | bcm5719-llvm-c048b6c4cd1025ae8144ea77b3ed7c43edb1c153.tar.gz bcm5719-llvm-c048b6c4cd1025ae8144ea77b3ed7c43edb1c153.zip |
Revert "Revert 220932.": "Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex"
This reverts commit r221331 and reinstate r220932 as discussed in D19271.
Original commit message was:
This patch adds an llvm_call_once which is a wrapper around
std::call_once on platforms where it is available and devoid
of bugs. The patch also migrates the ManagedStatic mutex to
be allocated using llvm_call_once.
These changes are philosophically equivalent to the changes
added in r219638, which were reverted due to a hang on Win32
which was the result of a bug in the Windows implementation
of std::call_once.
Differential Revision: http://reviews.llvm.org/D5922
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269577
Diffstat (limited to 'llvm/lib/Support/Threading.cpp')
-rw-r--r-- | llvm/lib/Support/Threading.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp index ca7f3f64aa3..59b937d9842 100644 --- a/llvm/lib/Support/Threading.cpp +++ b/llvm/lib/Support/Threading.cpp @@ -110,3 +110,10 @@ void llvm::llvm_execute_on_thread(void (*Fn)(void*), void *UserData, } #endif + +#if defined(LLVM_ON_UNIX) +#include "Unix/Threading.inc" +#else +#include "Windows/Threading.inc" +#endif + |