C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Abstraction for load-linked/store-conditional

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Mon, 22 Jul 2024 08:59:40 +0200
On 22/07/2024 00.23, Joseph Schuchart via Std-Proposals wrote:
> I'm not sure that this API could be implemented everywhere

And here's the problem: I don't know how you can provide ABA
avoidance if all your hardware has is atomic compare-and-swap.

So, this doesn't really help write portable programs.

We have rather few features in C++ that aren't available on all
implementations, so the introduction of such a non-portable
feature needs additional rationale.

(There are plenty of hardware features that aren't available
everywhere, yet we strive to make C++ interfaces on them that
can be implemented everywhere, e.g. std::simd.)

Jens

Received on 2024-07-22 06:59:45