Add autoconf checks for atomic64_cmpxchg + atomic64_xchg

These functions didn't exist for all archs prior to 2.6.24.  This
patch addes an autoconf test to detect this and add them when needed.
The autoconf check is needed instead of just an #ifndef because in
the most modern kernels atomic64_{cmp}xchg are implemented as in
inline function and not a #define.
This commit is contained in:
Brian Behlendorf
2009-10-30 13:53:17 -07:00
parent 5e9b5d832b
commit 302b88e6ab
5 changed files with 311 additions and 0 deletions
+1
View File
@@ -30,6 +30,7 @@
#include <linux/module.h>
#include <linux/spinlock.h>
#include <sys/types.h>
#include <asm/atomic_compat.h>
/*
* Two approaches to atomic operations are implemented each with its