On Mon, Sep 21, 2020 at 04:16:07PM +0200, Paolo Bonzini wrote:
> On 21/09/20 15:44, Stefan Hajnoczi wrote:
> > On Mon, Sep 21, 2020 at 01:15:30PM +0200, Paolo Bonzini wrote:
> >> On 21/09/20 12:41, Stefan Hajnoczi wrote:
> > They don't provide atomic arithmetic/logic operations. The only
> > non-seq-cst ALU operation I see in atomic.h is
> > atomic_fetch_inc_nonzero(), and it's a cmpxchg() loop (ugly compared to
> > an atomic ALU instruction).
> 
> Seq-cst is fine for RMW operations (arithmetic/logic, xchg, cmpxchg),
> also because they're usually less performance critical than loads and
> stores.  It's only loads and stores that give a false sense of
> correctness as in the above commit.

Okay. I've sent a patch to simply prefix atomic.h atomic_*() functions
with qemu_. That way they don't conflict with <stdatomic.h>.

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to