patch-2.1.120 linux/include/asm-m68k/spinlock.h
Next file: linux/include/asm-m68k/uaccess.h
Previous file: linux/include/asm-m68k/softirq.h
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Wed Sep 2 09:39:18 1998
- Orig file:
v2.1.119/linux/include/asm-m68k/spinlock.h
- Orig date:
Sat May 24 09:10:24 1997
diff -u --recursive --new-file v2.1.119/linux/include/asm-m68k/spinlock.h linux/include/asm-m68k/spinlock.h
@@ -5,8 +5,16 @@
* We don't do SMP on the m68k .... at least not yet.
*/
-typedef struct { int dummy; } spinlock_t;
+/*
+ * Gcc-2.7.x has a nasty bug with empty initializers.
+ */
+#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+typedef struct { } spinlock_t;
+#define SPIN_LOCK_UNLOCKED { }
+#else
+typedef struct { int gcc_is_buggy; } spinlock_t;
#define SPIN_LOCK_UNLOCKED { 0 }
+#endif
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) do { } while(0)
@@ -31,8 +39,8 @@
* irq-safe write-lock, but readers can get non-irqsafe
* read-locks.
*/
-typedef struct { int dummy; } rwlock_t;
-#define RW_LOCK_UNLOCKED { 0 }
+typedef struct { } rwlock_t;
+#define RW_LOCK_UNLOCKED { }
#define read_lock(lock) do { } while(0)
#define read_unlock(lock) do { } while(0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov