Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Thursday, March 14, 2019 11:54 PM
> To: Joyce Kong (Arm Technology China) <[email protected]>
> Cc: [email protected]; nd <[email protected]>; Gavin Hu (Arm Technology China)
> <[email protected]>; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; Honnappa Nagarahalli
> <[email protected]>
> Subject: Re: [dpdk-dev] [PATCH v3 1/3] rwlock: reimplement with atomic
> builtins
> 
> On Thu, 14 Mar 2019 21:15:02 +0800
> Joyce Kong <[email protected]> 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