summaryrefslogtreecommitdiff
path: root/packages/obsolete/nslu2/nslu2-kernel/2.6.14/28-spinlock-up.patch
blob: 3ae5178cff58a652c82ef7a2fb15730400a56ec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- linux-2.6.14-rc5/include/linux/spinlock_up.h	2005-10-26 08:37:20.164248408 -0700
+++ patched/include/linux/spinlock_up.h	2005-10-26 12:15:13.458898975 -0700
@@ -47,6 +47,14 @@ static inline void __raw_spin_unlock(raw
 	lock->slock = 1;
 }
 
+#else /* DEBUG_SPINLOCK */
+#define __raw_spin_is_locked(lock)	((void)(lock), 0)
+/* for sched.c and kernel_lock.c: */
+# define __raw_spin_lock(lock)		do { (void)(lock); } while (0)
+# define __raw_spin_unlock(lock)	do { (void)(lock); } while (0)
+# define __raw_spin_trylock(lock)	({ (void)(lock); 1; })
+#endif /* DEBUG_SPINLOCK */
+
 /*
  * Read-write spinlocks. No debug version.
  */
@@ -57,14 +65,6 @@ static inline void __raw_spin_unlock(raw
 #define __raw_read_unlock(lock)		do { (void)(lock); } while (0)
 #define __raw_write_unlock(lock)	do { (void)(lock); } while (0)
 
-#else /* DEBUG_SPINLOCK */
-#define __raw_spin_is_locked(lock)	((void)(lock), 0)
-/* for sched.c and kernel_lock.c: */
-# define __raw_spin_lock(lock)		do { (void)(lock); } while (0)
-# define __raw_spin_unlock(lock)	do { (void)(lock); } while (0)
-# define __raw_spin_trylock(lock)	({ (void)(lock); 1; })
-#endif /* DEBUG_SPINLOCK */
-
 #define __raw_read_can_lock(lock)	(((void)(lock), 1))
 #define __raw_write_can_lock(lock)	(((void)(lock), 1))