[PATCH] D19271: Change CALL_ONCE_INITIALIZATION implementation to use static initialization

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 10:53:10 PDT 2016


rnk added a comment.

In http://reviews.llvm.org/D19271#410844, @joker.eph wrote:

> Chris B. pointed me to: http://reviews.llvm.org/D5922 which introduced `llvm::call_once`
>
> It was reverted because of a bug in std::call_once for "aarch64 debian". Anyone knows if we are still bound by this "bug" two years after? The revert didn't give much information, but I guess I can recommit the original revision and see if it breaks again.


Technically it's been 17 months (11/2014 to 4/2016). Given that it affected PPC and AArch64, I doubt the problem has been fixed. If you're willing to argue with people using busted platforms, then feel free to use std::call_once. If you just want this issue to go away and never bother you again, I'd stick with the thread safe static local. :)


http://reviews.llvm.org/D19271





More information about the llvm-commits mailing list