patch-2.4.7 linux/include/asm-sparc64/atomic.h

Next file: linux/include/asm-sparc64/hardirq.h
Previous file: linux/include/asm-sparc/vaddrs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/include/asm-sparc64/atomic.h linux/include/asm-sparc64/atomic.h
@@ -1,4 +1,4 @@
-/* $Id: atomic.h,v 1.21 2000/10/03 07:28:56 anton Exp $
+/* $Id: atomic.h,v 1.22 2001/07/11 23:56:07 davem Exp $
  * atomic.h: Thankfully the V9 is at least reasonable for this
  *           stuff.
  *
@@ -28,5 +28,11 @@
 
 #define atomic_inc(v) ((void)__atomic_add(1, v))
 #define atomic_dec(v) ((void)__atomic_sub(1, v))
+
+/* Atomic operations are already serializing */
+#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 /* !(__ARCH_SPARC64_ATOMIC__) */

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