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

Re: [Xen-devel] [PATCH v2 3/5] asm-arm/atomic.h: reorder macros to match x86-side



On Wed, 13 Jul 2016, Corneliu ZUZU wrote:
> Reorder macro definitions to match x86-side.
> 
> Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>


>  xen/include/asm-arm/atomic.h | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
> index 19a87a5..e8f7340 100644
> --- a/xen/include/asm-arm/atomic.h
> +++ b/xen/include/asm-arm/atomic.h
> @@ -138,16 +138,15 @@ static inline void _atomic_set(atomic_t *v, int i)
>  # error "unknown ARM variant"
>  #endif
>  
> -#define atomic_inc(v)       atomic_add(1, v)
> -#define atomic_dec(v)       atomic_sub(1, v)
> -
> -#define atomic_inc_and_test(v)  (atomic_add_return(1, v) == 0)
> -#define atomic_dec_and_test(v)  (atomic_sub_return(1, v) == 0)
> -#define atomic_inc_return(v)    (atomic_add_return(1, v))
> -#define atomic_dec_return(v)    (atomic_sub_return(1, v))
> -#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
> -
> -#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
> +#define atomic_inc_return(v)        (atomic_add_return(1, v))
> +#define atomic_dec_return(v)        (atomic_sub_return(1, v))
> +
> +#define atomic_sub_and_test(i, v)   (atomic_sub_return(i, v) == 0)
> +#define atomic_inc(v)               atomic_add(1, v)
> +#define atomic_inc_and_test(v)      (atomic_add_return(1, v) == 0)
> +#define atomic_dec(v)               atomic_sub(1, v)
> +#define atomic_dec_and_test(v)      (atomic_sub_return(1, v) == 0)
> +#define atomic_add_negative(i,v)    (atomic_add_return(i, v) < 0)
>  
>  #endif /* __ARCH_ARM_ATOMIC__ */
>  
> -- 
> 2.5.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.