diff options
author | pjd <pjd@FreeBSD.org> | 2008-03-16 21:20:50 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-03-16 21:20:50 +0000 |
commit | ea49d310bf69a1de4effcf20fc368f40b3541ef0 (patch) | |
tree | ef1e5ab50a7584e0e028a94391bd41725fc82f82 /sys/sun4v | |
parent | bc8c8477a02fa7911713785305f7fe01ee91f393 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/sun4v/include/atomic.h | 2 |
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 |