summaryrefslogtreecommitdiff
path: root/include/linux/spinlock.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@muc.de>2003-06-20 20:18:55 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-20 20:18:55 -0700
commitae86fb4fb0a98bbb66461209710ceea881fcf0ec (patch)
tree1b7bd6451be3c18644eaf0699d754cb837fe55eb /include/linux/spinlock.h
parentf5d256f844d50805f2e6b40aaf19460cd9b2e22b (diff)
[PATCH] Remove spinlock workaround for pre 2.95 gccs
Remove the empty initializer workaround that was added for egcs 1.1. Only 2.95+ is supported now, so all compilers should support empty structures. The if just checked for __GNUC__, which means that 2.95 got the workaround (and the incompatibility) too even though it didn't need it. Advantage is that gcc 2.95 and 3.x compiled kernels are now potentially binary compatible. Module loading still checks the compiler version, but it might be removable.
Diffstat (limited to 'include/linux/spinlock.h')
-rw-r--r--include/linux/spinlock.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 148ea9d43873..4e2c1973ae67 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -146,13 +146,8 @@ typedef struct {
/*
* gcc versions before ~2.95 have a nasty bug with empty initializers.
*/
-#if (__GNUC__ > 2)
- typedef struct { } spinlock_t;
- #define SPIN_LOCK_UNLOCKED (spinlock_t) { }
-#else
- typedef struct { int gcc_is_buggy; } spinlock_t;
- #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
-#endif
+typedef struct { } spinlock_t;
+#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
/*
* If CONFIG_SMP is unset, declare the _raw_* definitions as nops