ia64/xen-unstable
changeset 16331:7ac9bfbc24e2
[IA64] Fix spinlock initializer.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author | Alex Williamson <alex.williamson@hp.com> |
---|---|
date | Wed Nov 07 09:47:40 2007 -0700 (2007-11-07) |
parents | a071725bda88 |
children | 166bf3b04495 |
files | xen/include/asm-ia64/linux-xen/asm/spinlock.h |
line diff
1.1 --- a/xen/include/asm-ia64/linux-xen/asm/spinlock.h Tue Nov 06 14:20:05 2007 -0700 1.2 +++ b/xen/include/asm-ia64/linux-xen/asm/spinlock.h Wed Nov 07 09:47:40 2007 -0700 1.3 @@ -33,8 +33,20 @@ typedef struct { 1.4 #endif 1.5 } spinlock_t; 1.6 1.7 +#ifdef XEN 1.8 +#ifdef DEBUG_SPINLOCK 1.9 +#define SPIN_LOCK_UNLOCKED /*(spinlock_t)*/ { 0, NULL, -1, 0 } 1.10 +#else 1.11 +#define SPIN_LOCK_UNLOCKED /*(spinlock_t)*/ { 0, -1, 0 } 1.12 +#endif 1.13 +static inline void spin_lock_init(spinlock_t *lock) 1.14 +{ 1.15 + *lock = ((spinlock_t)SPIN_LOCK_UNLOCKED); 1.16 +} 1.17 +#else 1.18 #define SPIN_LOCK_UNLOCKED /*(spinlock_t)*/ { 0 } 1.19 #define spin_lock_init(x) ((x)->lock = 0) 1.20 +#endif 1.21 1.22 #ifdef ASM_SUPPORTED 1.23 /*