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

Re: [Xen-devel] [PATCHv2 1/4] atomic: replace atomic_compareandswap() with atomic_cmpxchg()



On Tue, 2016-01-26 at 16:25 +0000, David Vrabel wrote:
> atomic_compareandswap() used atomic_t as the new, old and returned
> values which is less convinient than using just int.

"convenient"

> diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
> index 5a38c67..29ab265 100644
> --- a/xen/include/asm-arm/atomic.h
> +++ b/xen/include/asm-arm/atomic.h
> @@ -138,14 +138,6 @@ static inline void _atomic_set(atomic_t *v, int i)
> Â# error "unknown ARM variant"
> Â#endif
> Â
> -static inline atomic_t atomic_compareandswap(
> -ÂÂÂÂatomic_t old, atomic_t new, atomic_t *v)
> -{
> -ÂÂÂÂatomic_t rc;
> -ÂÂÂÂrc.counter = __cmpxchg(&v->counter, old.counter, new.counter,
> sizeof(int));
> -ÂÂÂÂreturn rc;
> -}


Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>


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

 


Rackspace

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