From fa3584a48f646f5384f0950d9a560226ac3a3460 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 10 Jan 2011 17:13:15 -0600 Subject: [PATCH] RX: No userspace atomic_ops in Solaris pre-10 The atomic_ops(3C) family of functions do not exist in userspace before Solaris 10. So, only use them for rx_atomic operations if we're on AFS_SUN510_ENV, or if we're in the kernel. Also, include for kernel code and for userspace. Although they are currently equivalent, they are documented as separate, and pre-10 lacks . Change-Id: Id71857efcd6460f8223302850b548754c19d076f Reviewed-on: http://gerrit.openafs.org/3652 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/rx/rx_atomic.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rx/rx_atomic.h b/src/rx/rx_atomic.h index ba80f9cb7d..e920afc2cb 100644 --- a/src/rx/rx_atomic.h +++ b/src/rx/rx_atomic.h @@ -137,9 +137,13 @@ typedef atomic_t rx_atomic_t; #define rx_atomic_dec(X) atomic_dec(X) #define rx_atomic_sub(X, V) atomic_sub(V, X) -#elif defined(AFS_SUN58_ENV) +#elif defined(AFS_SUN510_ENV) || (defined(AFS_SUN58_ENV) && defined(KERNEL) && !defined(UKERNEL)) -# include +# if defined(KERNEL) && !defined(UKERNEL) +# include +# else +# include +# endif typedef struct { volatile unsigned int var;