From 6bcee8821fba5a3df593f0b93ae58fac8ed03070 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 6 Dec 2010 12:46:06 -0600 Subject: [PATCH] SOLARIS: Fix some rx_atomic.h warnings Include atomic.h so we get atomic_* prototypes, pass atomic->var in rx_atomic_sub, and pass unsigned int*s to the atomic_* functions. Change-Id: Ic8d745bc1726c850bd15d38702163e92587bb0a5 Reviewed-on: http://gerrit.openafs.org/3462 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/rx/rx_atomic.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rx/rx_atomic.h b/src/rx/rx_atomic.h index f82e2b3f3a..e59aad632b 100644 --- a/src/rx/rx_atomic.h +++ b/src/rx/rx_atomic.h @@ -125,8 +125,11 @@ typedef atomic_t rx_atomic_t; #define rx_atomic_sub(X, V) atomic_sub(V, X) #elif defined(AFS_SUN58_ENV) + +# include + typedef struct { - volatile int var; + volatile unsigned int var; } rx_atomic_t; static_inline void @@ -161,7 +164,7 @@ rx_atomic_dec(rx_atomic_t *atomic) { static_inline void rx_atomic_sub(rx_atomic_t *atomic, int change) { - atomic_add_32(&atomic, 0 - change); + atomic_add_32(&atomic->var, 0 - change); } #elif defined(__GNUC__) && defined(HAVE_SYNC_FETCH_AND_ADD)