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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Andrew Deason 2010-12-06 12:46:06 -06:00 committed by Derrick Brashear
parent 37817796c4
commit 6bcee8821f

View File

@ -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 <atomic.h>
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)