]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx: Raise minimum Linux atomics version to 2.6
authorAndrew Deason <adeason@sinenomine.net>
Wed, 25 Jul 2012 15:45:16 +0000 (10:45 -0500)
committerDerrick Brashear <shadow@dementix.org>
Wed, 25 Jul 2012 20:25:12 +0000 (13:25 -0700)
Linux 2.4 does not have atomic_dec_return. If we switch to a
dec_and_test-like API, then we could use the Linux 2.4 atomics. But
for now, just raise the minimum to 2.6, and for 2.4 and below just use
the generic atomics implementation so we can build.

Change-Id: Ie584bd420839dbcbe3158fe7b50df633cb7eba6d
Reviewed-on: http://gerrit.openafs.org/7875
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/rx/rx_atomic.h

index d8a5c90b0b98d1d355400dea170dab55ad4f306f..028fbb2af559ef3d049dbafbf609468bbf21e9cd 100644 (file)
@@ -124,7 +124,7 @@ static_inline void
 rx_atomic_sub(rx_atomic_t *atomic, int change) {
     OSAtomicAdd32(0 - change, &atomic->var);
 }
-#elif defined(AFS_LINUX20_ENV) && defined(KERNEL)
+#elif defined(AFS_LINUX26_ENV) && defined(KERNEL)
 #include <asm/atomic.h>
 
 typedef atomic_t rx_atomic_t;