Index: linux24/include/asm-i386/spinlock.h diff -u linux24/include/asm-i386/spinlock.h:1.1.1.1 linux24/include/asm-i386/spinlock.h:1.1.1.1.22.1 --- linux24/include/asm-i386/spinlock.h:1.1.1.1 Tue Dec 18 15:49:01 2001 +++ linux24/include/asm-i386/spinlock.h Fri Jan 25 11:57:13 2002 @@ -23,6 +23,8 @@ * Your basic SMP spinlocks, allowing only a single CPU anywhere */ +#define USE_NMCS_LOCK +#ifndef USE_NMCS_LOCK typedef struct { volatile unsigned int lock; #if SPINLOCK_DEBUG @@ -137,7 +139,20 @@ spin_lock_string :"=m" (lock->lock) : : "memory"); } +#else /*!USE_NMCS_LOCK*/ +#include +#define spinlock_t nmcslock_t +#define SPIN_LOCK_UNLOCKED NMCS_LOCK_UNLOCKED + +#define spin_lock_init(x) nmcs_lock_init(x) +#define spin_is_locked(x) nmcs_is_locked(x) +#define spin_unlock_wait(x) nmcs_unlock_wait(x) + +#define spin_lock(x) nmcs_lock(x) +#define spin_trylock(x) nmcs_trylock(x) +#define spin_unlock(x) nmcs_unlock(x) +#endif /* * Read-write spinlocks, allowing multiple readers Index: linux24/include/asm-ia64/spinlock.h diff -u linux24/include/asm-ia64/spinlock.h:1.1.1.1 linux24/include/asm-ia64/spinlock.h:1.1.1.1.22.1 --- linux24/include/asm-ia64/spinlock.h:1.1.1.1 Tue Dec 18 15:49:04 2001 +++ linux24/include/asm-ia64/spinlock.h Tue Jan 29 15:58:02 2002 @@ -67,6 +67,8 @@ #else /* !NEW_LOCK */ +#define USE_NMCS_LOCK +#ifndef USE_NMCS_LOCK typedef struct { volatile unsigned int lock; } spinlock_t; @@ -99,7 +101,20 @@ #define spin_unlock(x) do { barrier(); ((spinlock_t *) x)->lock = 0; } while (0) #define spin_trylock(x) (cmpxchg_acq(&(x)->lock, 0, 1) == 0) #define spin_unlock_wait(x) do { barrier(); } while ((x)->lock) +#else /*!USE_NMCS_LOCK*/ +#include +#define spinlock_t nmcslock_t +#define SPIN_LOCK_UNLOCKED NMCS_LOCK_UNLOCKED +#define spin_lock_init(x) nmcs_lock_init(x) +#define spin_is_locked(x) nmcs_is_locked(x) +#define spin_unlock_wait(x) nmcs_unlock_wait(x) + +#define spin_lock(x) nmcs_lock(x) +#define spin_trylock(x) nmcs_trylock(x) +#define spin_unlock(x) nmcs_unlock(x) + +#endif #endif /* !NEW_LOCK */ typedef struct {