[PATCH] D13051: Add placeholder __libcpp_relaxed_store() for when atomic builtins are not available.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 22 10:44:59 PDT 2015

EricWF added a comment.

Does anything actually need this? This interface was never really meant to be complete, just want was needed.

> It's a shame that libc++ decided to reinvent the wheel here and not use the C11 atomics support

GCC doesn't provide "_Atomic" and `<atomic>` isn't always fully available. This is a minimal subset of atomic functionality needed to support `std::shared_ptr` and `std::call_once` among other things. All new code should use std::atomic IMO. It's not meant to reinvent the wheel, It's meant to be a portable option for when there is no "wheel" already.

Does armv4 need lib calls for atomic operations on "unsigned long"?


More information about the cfe-commits mailing list