34 #ifndef _RTE_SPINLOCK_H_
35 #define _RTE_SPINLOCK_H_
51 #ifdef RTE_FORCE_INTRINSICS
65 #define RTE_SPINLOCK_INITIALIZER { 0 }
88 #ifdef RTE_FORCE_INTRINSICS
92 while (__sync_lock_test_and_set(&sl->
locked, 1))
107 #ifdef RTE_FORCE_INTRINSICS
111 __sync_lock_release(&sl->
locked);
126 #ifdef RTE_FORCE_INTRINSICS
130 return __sync_lock_test_and_set(&sl->
locked,1) == 0;
212 #define RTE_SPINLOCK_RECURSIVE_INITIALIZER {RTE_SPINLOCK_INITIALIZER, -1, 0}
237 if (slr->
user !=
id) {
251 if (--(slr->
count) == 0) {
270 if (slr->
user !=
id) {
static int rte_spinlock_recursive_trylock(rte_spinlock_recursive_t *slr)
static void rte_spinlock_recursive_lock_tm(rte_spinlock_recursive_t *slr)
static void rte_spinlock_lock(rte_spinlock_t *sl)
static void rte_spinlock_recursive_init(rte_spinlock_recursive_t *slr)
static void rte_spinlock_recursive_lock(rte_spinlock_recursive_t *slr)
static void rte_spinlock_unlock(rte_spinlock_t *sl)
static void rte_spinlock_unlock_tm(rte_spinlock_t *sl)
static void rte_spinlock_init(rte_spinlock_t *sl)
static int rte_tm_supported(void)
static int rte_spinlock_trylock_tm(rte_spinlock_t *sl)
static void rte_spinlock_recursive_unlock_tm(rte_spinlock_recursive_t *slr)
static int rte_spinlock_recursive_trylock_tm(rte_spinlock_recursive_t *slr)
static int rte_spinlock_is_locked(rte_spinlock_t *sl)
static int rte_spinlock_trylock(rte_spinlock_t *sl)
static void rte_spinlock_lock_tm(rte_spinlock_t *sl)
static int rte_gettid(void)
static void rte_spinlock_recursive_unlock(rte_spinlock_recursive_t *slr)