[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Fix spinlock initializer.



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1194454060 25200
# Node ID 7ac9bfbc24e26774359216867926b7c8d6a3d999
# Parent  a071725bda88f7ee6c89adee727735b410f2ad68
[IA64] Fix spinlock initializer.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/include/asm-ia64/linux-xen/asm/spinlock.h |   12 ++++++++++++
 1 files changed, 12 insertions(+)

diff -r a071725bda88 -r 7ac9bfbc24e2 
xen/include/asm-ia64/linux-xen/asm/spinlock.h
--- a/xen/include/asm-ia64/linux-xen/asm/spinlock.h     Tue Nov 06 14:20:05 
2007 -0700
+++ b/xen/include/asm-ia64/linux-xen/asm/spinlock.h     Wed Nov 07 09:47:40 
2007 -0700
@@ -33,8 +33,20 @@ typedef struct {
 #endif
 } spinlock_t;
 
+#ifdef XEN
+#ifdef DEBUG_SPINLOCK
+#define SPIN_LOCK_UNLOCKED     /*(spinlock_t)*/ { 0, NULL, -1, 0 }
+#else
+#define SPIN_LOCK_UNLOCKED     /*(spinlock_t)*/ { 0, -1, 0 }
+#endif
+static inline void spin_lock_init(spinlock_t *lock)
+{
+       *lock = ((spinlock_t)SPIN_LOCK_UNLOCKED);
+}
+#else
 #define SPIN_LOCK_UNLOCKED                     /*(spinlock_t)*/ { 0 }
 #define spin_lock_init(x)                      ((x)->lock = 0)
+#endif
 
 #ifdef ASM_SUPPORTED
 /*

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.