> -----Original Message----- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, September 08, 2015 4:52 PM > To: Wu, Feng > Cc: Andrew Cooper; xen-devel@lists.xen.org; Keir Fraser > Subject: RE: [PATCH v6 02/18] Add cmpxchg16b support for x86-64 > > >>> On 08.09.15 at 09:37, <feng...@intel.com> 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@lists.xen.org http://lists.xen.org/xen-devel