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

Re: [Xen-devel] [PATCHv2 4/6] x86: provide xadd()



On Thu, 2015-04-16 at 12:25 +0100, Tim Deegan wrote:
> But also: AFAICS the GCC builtin __sync_fetch_and_add() does almost
> exactly this (the difference being that those are also compiler
> barriers where this is only a CPU barrier).  Should we be using it
> instead?

In general I'm of the opinion we should, because it makes my life easier
on ARM (and perhaps we should trust compiler folks...)

Big question though would be when it became available in gcc. I think
that's generally why Linux hasn't switched in many cases, or perhaps
(historical?) concerns about whether they are optimal enough.

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