[PATCH] Removing the static destructor from ManagedStatic.cpp by controlling the allocation and de-allocaation of the mutex.
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9602 bytes
Desc: not available
More information about the llvm-commits