[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 13:49 +0100, Tim Deegan wrote: > At 12:49 +0100 on 16 Apr (1429188559), Jan Beulich wrote: > > >>> On 16.04.15 at 13:25, <tim@xxxxxxx> 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? > > > > I'm afraid that's useful only from gcc 4.5.x onwards; earlier versions > > (on x86 at least) simply generate a function call relying on a library to > > implement it. > > Darn. :( Might it still be a better generic fallback than the C/cmpxchg one? On x86 you'd get the asm version, and on ARM you need 4.5.x onwards anyway, plus in general the ARM folks seem to recommend using the builtins more anyway. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |