qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 13/35] tcg: Add atomic helpers


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v6 13/35] tcg: Add atomic helpers
Date: Sun, 16 Oct 2016 18:09:52 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 10/16/2016 03:17 PM, Emilio G. Cota wrote:
> +/* Note that for addition, we need to use a separate cmpxchg loop instead
> +   of bswaps for the reverse-host-endian helpers.  */
> +ABI_TYPE ATOMIC_NAME(fetch_add)(CPUArchState *env, target_ulong addr,
> +                         ABI_TYPE val EXTRA_ARGS)
> +{
> +    DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP;
> +    DATA_TYPE ldo, ldn, ret, sto;
> +
> +    ldo = *haddr;
        ldo = atomic_read(haddr)
would be better here for C11 compliance (or tsan will complain).


Good point.  Fixed.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]