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/h8300/include/asm/atomic.h | |
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/h8300/include/asm/atomic.h')
-rw-r--r-- | arch/h8300/include/asm/atomic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h index b4cf0ea97ede..833186c8dc3b 100644 --- a/arch/h8300/include/asm/atomic.h +++ b/arch/h8300/include/asm/atomic.h | |||
@@ -1,12 +1,13 @@ | |||
1 | #ifndef __ARCH_H8300_ATOMIC__ | 1 | #ifndef __ARCH_H8300_ATOMIC__ |
2 | #define __ARCH_H8300_ATOMIC__ | 2 | #define __ARCH_H8300_ATOMIC__ |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * Atomic operations that C can't guarantee us. Useful for | 7 | * Atomic operations that C can't guarantee us. Useful for |
6 | * resource counting etc.. | 8 | * resource counting etc.. |
7 | */ | 9 | */ |
8 | 10 | ||
9 | typedef struct { int counter; } atomic_t; | ||
10 | #define ATOMIC_INIT(i) { (i) } | 11 | #define ATOMIC_INIT(i) { (i) } |
11 | 12 | ||
12 | #define atomic_read(v) ((v)->counter) | 13 | #define atomic_read(v) ((v)->counter) |