[PATCH] Removing the static destructor from ManagedStatic.cpp by controlling the allocation and de-allocaation of the mutex.
Chris Bieneman
beanz at apple.com
Tue Oct 7 15:05:04 PDT 2014
This revision of the patch handles the thread safe initialization concerns that were raised by Chandler and Reid. The approach to handling the thread safe initialization is the implementation of a new LLVM_CALL_ONCE macro which has implementations using C++11 call_once, pthread_once, and sys::CompareAndSwap.
The LLVM_CALL_ONCE macro could alternatively be implemented as a function taking two pointer parameters, one to the function to execute, and the other to the flag.
http://reviews.llvm.org/D5473
Files:
cmake/config-ix.cmake
configure
include/llvm/Config/config.h.cmake
include/llvm/Config/config.h.in
include/llvm/Support/Threading.h
lib/Support/ManagedStatic.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5473.14532.patch
Type: text/x-patch
Size: 9602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141007/e6e18516/attachment.bin>
More information about the llvm-commits
mailing list