40 #define RTE_RWLOCK_INITIALIZER { 0 }
66 while (success == 0) {
67 x = __atomic_load_n(&rwl->
cnt, __ATOMIC_RELAXED);
73 success = __atomic_compare_exchange_n(&rwl->
cnt, &x, x + 1, 1,
74 __ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
87 __atomic_fetch_sub(&rwl->
cnt, 1, __ATOMIC_RELEASE);
102 while (success == 0) {
103 x = __atomic_load_n(&rwl->
cnt, __ATOMIC_RELAXED);
109 success = __atomic_compare_exchange_n(&rwl->
cnt, &x, -1, 1,
110 __ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
123 __atomic_store_n(&rwl->
cnt, 0, __ATOMIC_RELEASE);
static void rte_rwlock_write_lock_tm(rte_rwlock_t *rwl)
static void rte_rwlock_read_lock(rte_rwlock_t *rwl)
static void rte_rwlock_read_lock_tm(rte_rwlock_t *rwl)
static void rte_rwlock_read_unlock(rte_rwlock_t *rwl)
static void rte_pause(void)
static void rte_rwlock_write_unlock(rte_rwlock_t *rwl)
static void rte_rwlock_read_unlock_tm(rte_rwlock_t *rwl)
static void rte_rwlock_write_lock(rte_rwlock_t *rwl)
static void rte_rwlock_init(rte_rwlock_t *rwl)
static void rte_rwlock_write_unlock_tm(rte_rwlock_t *rwl)