diff options
author | Matthew Wilcox <matthew@wil.cx> | 2009-01-06 17:40:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 18:59:10 -0500 |
commit | ea435467500612636f8f4fb639ff6e76b2496e4b (patch) | |
tree | fdf5cb7ca3834f0a4120fb3cce5a631dd2769f26 /arch/s390/include | |
parent | f99ebf0a86de13f77bc4ee349de96db9f2f67f2e (diff) |
atomic_t: unify all arch definitions
The atomic_t type cannot currently be used in some header files because it
would create an include loop with asm/atomic.h. Move the type definition
to linux/types.h to break the loop.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/atomic.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h index 2d184655bc5d..de432f2de2d2 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __ARCH_S390_ATOMIC__ | 2 | #define __ARCH_S390_ATOMIC__ |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/types.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * include/asm-s390/atomic.h | 8 | * include/asm-s390/atomic.h |
@@ -23,9 +24,6 @@ | |||
23 | * S390 uses 'Compare And Swap' for atomicity in SMP enviroment | 24 | * S390 uses 'Compare And Swap' for atomicity in SMP enviroment |
24 | */ | 25 | */ |
25 | 26 | ||
26 | typedef struct { | ||
27 | int counter; | ||
28 | } __attribute__ ((aligned (4))) atomic_t; | ||
29 | #define ATOMIC_INIT(i) { (i) } | 27 | #define ATOMIC_INIT(i) { (i) } |
30 | 28 | ||
31 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
@@ -149,9 +147,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
149 | #undef __CS_LOOP | 147 | #undef __CS_LOOP |
150 | 148 | ||
151 | #ifdef __s390x__ | 149 | #ifdef __s390x__ |
152 | typedef struct { | ||
153 | long long counter; | ||
154 | } __attribute__ ((aligned (8))) atomic64_t; | ||
155 | #define ATOMIC64_INIT(i) { (i) } | 150 | #define ATOMIC64_INIT(i) { (i) } |
156 | 151 | ||
157 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) | 152 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) |