Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Thursday, March 14, 2019 11:54 PM
> To: Joyce Kong (Arm Technology China) <joyce.k...@arm.com>
> Cc: dev@dpdk.org; nd <n...@arm.com>; Gavin Hu (Arm Technology China)
> <gavin...@arm.com>; jer...@marvell.com; konstantin.anan...@intel.com;
> chao...@linux.vnet.ibm.com; bruce.richard...@intel.com;
> tho...@monjalon.net; hemant.agra...@nxp.com; Honnappa Nagarahalli
> <honnappa.nagaraha...@arm.com>
> Subject: Re: [dpdk-dev] [PATCH v3 1/3] rwlock: reimplement with atomic
> builtins
> 
> On Thu, 14 Mar 2019 21:15:02 +0800
> Joyce Kong <joyce.k...@arm.com> wrote:
> 
> > -           success = rte_atomic32_cmpset((volatile uint32_t *)&rwl-
> >cnt,
> > -                                         (uint32_t)x, (uint32_t)(x + 1));
> > +           success = __atomic_compare_exchange_n(&rwl->cnt, &x,
> x+1, 1,
> > +                                   __ATOMIC_ACQUIRE,
> __ATOMIC_RELAXED);
> 
> Would it be possible to have rte_atomic32_cmpset be an inline function
> that became __atomic_comppare_exchange? Then all usages would be the
> same.

There is already a patch for this and Honnappa commented on this: 
https://mails.dpdk.org/archives/dev/2019-January/124297.html


Reply via email to