aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/types.h
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2009-01-06 14:40:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 15:59:10 -0800
commitea435467500612636f8f4fb639ff6e76b2496e4b (patch)
treefdf5cb7ca3834f0a4120fb3cce5a631dd2769f26 /include/linux/types.h
parentinit: properly placing noinline keyword (diff)
downloadwireguard-linux-ea435467500612636f8f4fb639ff6e76b2496e4b.tar.xz
wireguard-linux-ea435467500612636f8f4fb639ff6e76b2496e4b.zip
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 'include/linux/types.h')
-rw-r--r--include/linux/types.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/types.h b/include/linux/types.h
index 121f349cb7ec..3b864f2d9560 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -195,6 +195,16 @@ typedef u32 phys_addr_t;
typedef phys_addr_t resource_size_t;
+typedef struct {
+ volatile int counter;
+} atomic_t;
+
+#ifdef CONFIG_64BIT
+typedef struct {
+ volatile long counter;
+} atomic64_t;
+#endif
+
struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;