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

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 22 11:23:21 PDT 2015

On Tue, Sep 22, 2015 at 05:44:59PM +0000, Eric Fiselier via cfe-commits wrote:
> 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"?

Yes, the hardware doesn't support anything.


More information about the cfe-commits mailing list