summaryrefslogtreecommitdiffstats
path: root/sys/sun4v/include
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2008-03-16 21:20:50 +0000
committerpjd <pjd@FreeBSD.org>2008-03-16 21:20:50 +0000
commitea49d310bf69a1de4effcf20fc368f40b3541ef0 (patch)
treeef1e5ab50a7584e0e028a94391bd41725fc82f82 /sys/sun4v/include
parentbc8c8477a02fa7911713785305f7fe01ee91f393 (diff)
downloadFreeBSD-src-ea49d310bf69a1de4effcf20fc368f40b3541ef0.zip
FreeBSD-src-ea49d310bf69a1de4effcf20fc368f40b3541ef0.tar.gz
Implement atomic_fetchadd_long() for all architectures and document it.
Reviewed by: attilio, jhb, jeff, kris (as a part of the uidinfo_waitfree.patch)
Diffstat (limited to 'sys/sun4v/include')
-rw-r--r--sys/sun4v/include/atomic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sun4v/include/atomic.h b/sys/sun4v/include/atomic.h
index 77d455b..61b7ade 100644
--- a/sys/sun4v/include/atomic.h
+++ b/sys/sun4v/include/atomic.h
@@ -279,6 +279,8 @@ ATOMIC_GEN(ptr, uintptr_t *, uintptr_t, uintptr_t, 64);
#define atomic_fetchadd_int atomic_add_int
#define atomic_fetchadd_32 atomic_add_32
+#define atomic_fetchadd_long(p, v) \
+ (u_long)atomic_add_int((volatile u_int *)(p), (u_int)(v))
#undef ATOMIC_GEN
#undef atomic_cas
OpenPOWER on IntegriCloud