From ea49d310bf69a1de4effcf20fc368f40b3541ef0 Mon Sep 17 00:00:00 2001 From: pjd Date: Sun, 16 Mar 2008 21:20:50 +0000 Subject: Implement atomic_fetchadd_long() for all architectures and document it. Reviewed by: attilio, jhb, jeff, kris (as a part of the uidinfo_waitfree.patch) --- sys/sun4v/include/atomic.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/sun4v/include') 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 -- cgit v1.1