[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 02/18] Add cmpxchg16b support for x86-64
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: Tuesday, September 08, 2015 4:52 PM > To: Wu, Feng > Cc: Andrew Cooper; xen-devel@xxxxxxxxxxxxx; Keir Fraser > Subject: RE: [PATCH v6 02/18] Add cmpxchg16b support for x86-64 > > >>> On 08.09.15 at 09:37, <feng.wu@xxxxxxxxx> wrote: > > Thanks for your suggestion. How about this? > > > > #define cmpxchg16b(ptr,o,n) > \ > > ( ({ ASSERT(((unsigned long)ptr & 0xF) == 0); }), \ > > BUILD_BUG_ON(sizeof(*o) != sizeof(__uint128_t)), > \ > > BUILD_BUG_ON(sizeof(*n) != sizeof(__uint128_t)), > \ > > __cmpxchg16b((ptr), (__uint128_t *)(o), (__uint128_t *)(n)) ) > > Yes (properly parenthesized and the ({ }) either removed or extended We need the ({ }) for the ASSERT statement, or we will meet build error. Thanks, Feng > to the whole expression). > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |