@@ -186,16 +186,16 @@ static inline int opal_atomic_cmpset_128 (volatile opal_int128_t *addr,
186186
187187#define OPAL_HAVE_ATOMIC_SPINLOCKS 1
188188
189- static inline void opal_atomic_init (opal_atomic_lock_t * lock , int32_t value )
189+ static inline void opal_atomic_lock_init (opal_atomic_lock_t * lock , int32_t value )
190190{
191191 lock -> u .lock = value ;
192192}
193193
194194static inline int opal_atomic_trylock (opal_atomic_lock_t * lock )
195195{
196- int ret = __atomic_exchange_n (& lock -> u .lock , OPAL_ATOMIC_LOCKED ,
196+ int ret = __atomic_exchange_n (& lock -> u .lock , OPAL_ATOMIC_LOCK_LOCKED ,
197197 __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE );
198- if (OPAL_ATOMIC_LOCKED == ret ) {
198+ if (OPAL_ATOMIC_LOCK_LOCKED == ret ) {
199199 /* abort the transaction */
200200 _mm_pause ();
201201 return 1 ;
@@ -206,7 +206,7 @@ static inline int opal_atomic_trylock(opal_atomic_lock_t *lock)
206206
207207static inline void opal_atomic_lock (opal_atomic_lock_t * lock )
208208{
209- while (OPAL_ATOMIC_LOCKED == __atomic_exchange_n (& lock -> u .lock , OPAL_ATOMIC_LOCKED ,
209+ while (OPAL_ATOMIC_LOCK_LOCKED == __atomic_exchange_n (& lock -> u .lock , OPAL_ATOMIC_LOCK_LOCKED ,
210210 __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE )) {
211211 /* abort the transaction */
212212 _mm_pause ();
@@ -215,7 +215,7 @@ static inline void opal_atomic_lock (opal_atomic_lock_t *lock)
215215
216216static inline void opal_atomic_unlock (opal_atomic_lock_t * lock )
217217{
218- __atomic_store_n (& lock -> u .lock , OPAL_ATOMIC_UNLOCKED ,
218+ __atomic_store_n (& lock -> u .lock , OPAL_ATOMIC_LOCK_UNLOCKED ,
219219 __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE );
220220}
221221
0 commit comments