patch-2.2.0-pre6 linux/include/asm-arm/atomic.h

Next file: linux/include/asm-arm/byteorder.h
Previous file: linux/include/asm-arm/arch-vnc/time.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre5/linux/include/asm-arm/atomic.h linux/include/asm-arm/atomic.h
@@ -12,16 +12,22 @@
 #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))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov