6 #ifndef ABTI_SPINLOCK_H_INCLUDED 7 #define ABTI_SPINLOCK_H_INCLUDED 13 #define ABTI_SPINLOCK_STATIC_INITIALIZER() \ 15 ABTD_ATOMIC_BOOL_STATIC_INITIALIZER(0) \ 18 static inline void ABTI_spinlock_clear(ABTI_spinlock *p_lock)
20 ABTD_atomic_relaxed_clear_bool(&p_lock->val);
23 static inline void ABTI_spinlock_acquire(ABTI_spinlock *p_lock)
25 while (ABTD_atomic_test_and_set_bool(&p_lock->val)) {
26 while (ABTD_atomic_acquire_load_bool(&p_lock->val) !=
ABT_FALSE)
31 static inline void ABTI_spinlock_release(ABTI_spinlock *p_lock)
33 ABTD_atomic_release_clear_bool(&p_lock->val);