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.