patch-2.4.9 linux/include/asm-arm/atomic.h

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

diff -u --recursive --new-file v2.4.8/linux/include/asm-arm/atomic.h linux/include/asm-arm/atomic.h
@@ -85,7 +85,7 @@
 	return result;
 }
 
-extern __inline__ int atomic_add_negative(int i, volatile atomic_t *v)
+static inline int atomic_add_negative(int i, volatile atomic_t *v)
 {
 	unsigned long flags;
 	int result;
@@ -106,6 +106,12 @@
 	*addr &= ~mask;
 	__restore_flags(flags);
 }
+
+/* Atomic operations are already serializing on ARM */
+#define smp_mb__before_atomic_dec()	barrier()
+#define smp_mb__after_atomic_dec()	barrier()
+#define smp_mb__before_atomic_inc()	barrier()
+#define smp_mb__after_atomic_inc()	barrier()
 
 #endif
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)