From d09e48daed28d024ef6da494e74a75fef73d0e0d Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Fri, 22 Feb 2013 17:15:09 -0500 Subject: [PATCH] ck_spinlock: Only enable trylock path for TSO architectures at the moment. --- include/ck_spinlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ck_spinlock.h b/include/ck_spinlock.h index 0172995..6b08789 100644 --- a/include/ck_spinlock.h +++ b/include/ck_spinlock.h @@ -410,7 +410,7 @@ ck_spinlock_dec_unlock(struct ck_spinlock_dec *lock) * trylock functionality on availability of 32-bit or 64-bit fetch-and-add * and compare-and-swap. */ -#ifndef CK_SPINLOCK_TICKET_TRYLOCK_DISABLE +#if defined(CK_MD_TSO) #if defined(CK_F_PR_FAA_32) && defined(CK_F_PR_INC_16) && defined(CK_F_PR_CAS_32) #define CK_SPINLOCK_TICKET_TYPE uint32_t #define CK_SPINLOCK_TICKET_TYPE_BASE uint16_t @@ -432,7 +432,7 @@ ck_spinlock_dec_unlock(struct ck_spinlock_dec *lock) #define CK_SPINLOCK_TICKET_MASK (0xFFFFFFFFULL) #define CK_SPINLOCK_TICKET_SHIFT (32) #endif -#endif /* CK_SPINLOCK_TICKET_TRYLOCK_DISABLE */ +#endif /* CK_MD_TSO */ #if defined(CK_SPINLOCK_TICKET_TYPE) #define CK_F_SPINLOCK_TICKET_TRYLOCK