summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/atomic.h')
-rw-r--r--include/asm-arm/atomic.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
index 48d688eb1..431194234 100644
--- a/include/asm-arm/atomic.h
+++ b/include/asm-arm/atomic.h
@@ -12,17 +12,23 @@
#ifndef __ASM_ARM_ATOMIC_H
#define __ASM_ARM_ATOMIC_H
+#ifdef __SMP__
+#error SMP not supported
+#endif
+
+#include <linux/config.h>
+
+#ifdef CONFIG_ARCH_CO285
+typedef struct { volatile int counter; } atomic_t;
+#else
typedef struct { int counter; } atomic_t;
+#endif
#define ATOMIC_INIT(i) { (i) }
#ifdef __KERNEL__
#include <asm/system.h>
-#ifdef __SMP__
-#error SMP not supported
-#endif
-
#define atomic_read(v) ((v)->counter)
#define atomic_set(v,i) (((v)->counter) = (i))