On Thu, 2015-04-16 at 16:28 +0100, Jan Beulich wrote: > >>> On 10.04.15 at 16:19, <david.vra...@citrix.com> wrote: > > +#define xadd(ptr, v) generic_xaddl((ptr), (v)) > > I think it is at least confusing to call the thing xadd (looking to be > size generic) and then expand to generic_xaddl (only supporting > 32-bit operations), yet subsequently implementing a size-generic > xadd() for x86.
Indeed, and I went to build on arm32 prior to hacking up a proper xadd and: spinlock.c: In function ‘_spin_lock’: spinlock.c:145:5: error: passing argument 1 of ‘generic_xaddl’ from incompatible pointer type [-Werror] tickets.head_tail = xadd(&lock->tickets, tickets.head_tail); ^ spinlock.c:15:12: note: expected ‘volatile u32 *’ but argument is of type ‘union spinlock_tickets_t *’ static u32 generic_xaddl(volatile u32 *ptr, u32 v) ^ (I hope to knock up the arm asm version in the next hour or so, so you may not care...) Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel