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/mips/include/asm | |
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/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/atomic.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index 1232be3885b0..c996c3b4d074 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -15,13 +15,12 @@ | |||
15 | #define _ASM_ATOMIC_H | 15 | #define _ASM_ATOMIC_H |
16 | 16 | ||
17 | #include <linux/irqflags.h> | 17 | #include <linux/irqflags.h> |
18 | #include <linux/types.h> | ||
18 | #include <asm/barrier.h> | 19 | #include <asm/barrier.h> |
19 | #include <asm/cpu-features.h> | 20 | #include <asm/cpu-features.h> |
20 | #include <asm/war.h> | 21 | #include <asm/war.h> |
21 | #include <asm/system.h> | 22 | #include <asm/system.h> |
22 | 23 | ||
23 | typedef struct { volatile int counter; } atomic_t; | ||
24 | |||
25 | #define ATOMIC_INIT(i) { (i) } | 24 | #define ATOMIC_INIT(i) { (i) } |
26 | 25 | ||
27 | /* | 26 | /* |
@@ -404,8 +403,6 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
404 | 403 | ||
405 | #ifdef CONFIG_64BIT | 404 | #ifdef CONFIG_64BIT |
406 | 405 | ||
407 | typedef struct { volatile long counter; } atomic64_t; | ||
408 | |||
409 | #define ATOMIC64_INIT(i) { (i) } | 406 | #define ATOMIC64_INIT(i) { (i) } |
410 | 407 | ||
411 | /* | 408 | /* |