Oops. Use atomic_add_long() for atomic_fetchadd_long() (not atomic_add_int())

for sparc64 and sun4v.

Noticed by:	marius
This commit is contained in:
pjd 2008-03-19 07:27:24 +00:00
parent ea2b75bd30
commit 2023a8c5fd
2 changed files with 2 additions and 4 deletions

View File

@ -279,8 +279,7 @@ 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))
#define atomic_fetchadd_long atomic_add_long
#undef ATOMIC_GEN
#undef atomic_cas

View File

@ -279,8 +279,7 @@ 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))
#define atomic_fetchadd_long atomic_add_long
#undef ATOMIC_GEN
#undef atomic_cas