[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h
From: |
Richard Henderson |
Subject: |
Re: [PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h |
Date: |
Thu, 26 Mar 2020 12:58:32 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 3/26/20 10:01 AM, Alex Bennée wrote:
> +
> +#ifndef atomic_fetch_add
> #define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST)
> #define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST)
> #define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST)
> #define atomic_fetch_or(ptr, n) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST)
> #define atomic_fetch_xor(ptr, n) __atomic_fetch_xor(ptr, n, __ATOMIC_SEQ_CST)
> +#endif
Do we really get sequential consistency from <stdatomic.h>?
Should we not in fact #undef as a workaround instead?
r~
Re: [PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h,
Richard Henderson <=