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

Re: [Xen-devel] [PATCH 6/9] tools: memshr: arm64 support



On Fri, 2013-03-15 at 14:30 +0000, Andres Lagar-Cavilla wrote:
> > I'm not mad keen on propagating these sorts of asm atomic operations
> > throughout
> > our code base. Other options would be:
> 
> 
> gcc has atomic builtins to do this kind of work. I don't know about
> arm, but they do the job in x86
> http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html
> so atomic_inc(val) -> __sync_fetch_and_add(val, 1) and likewise for
> dec/sub

Yes, that might be a suitable replacement, assuming they exist (and work
right) in all the x86 gcc's we support (not sure how far back that is)

I suppose I could use the builtins on ARM only in the meantime.

Thanks!

Ian.


_______________________________________________
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®.