svn commit: r224313 - stable/8/sys/sparc64/include
Marius Strobl
marius at FreeBSD.org
Mon Jul 25 14:42:34 UTC 2011
Author: marius
Date: Mon Jul 25 14:42:34 2011
New Revision: 224313
URL: http://svn.freebsd.org/changeset/base/224313
Log:
MFC: r221750
Add an ATOMIC_CLEAR_LONG.
Modified:
stable/8/sys/sparc64/include/asmacros.h
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/geom/label/ (props changed)
Modified: stable/8/sys/sparc64/include/asmacros.h
==============================================================================
--- stable/8/sys/sparc64/include/asmacros.h Mon Jul 25 14:39:22 2011 (r224312)
+++ stable/8/sys/sparc64/include/asmacros.h Mon Jul 25 14:42:34 2011 (r224313)
@@ -90,6 +90,17 @@
bne,pn %icc, 9b ; \
mov r3, r2
+/*
+ * Atomically clear a number of bits of an u_long in memory.
+ */
+#define ATOMIC_CLEAR_LONG(r1, r2, r3, bits) \
+ ldx [r1], r2 ; \
+9: andn r2, bits, r3 ; \
+ casxa [r1] ASI_N, r2, r3 ; \
+ cmp r2, r3 ; \
+ bne,pn %icc, 9b ; \
+ mov r3, r2
+
#define PCPU(member) PCPU_REG + PC_ ## member
#define PCPU_ADDR(member, reg) \
add PCPU_REG, PC_ ## member, reg
More information about the svn-src-all
mailing list