diff options
Diffstat (limited to 'include/sys/atomic.h')
-rw-r--r-- | include/sys/atomic.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/sys/atomic.h b/include/sys/atomic.h index 7a741de17..f522781fc 100644 --- a/include/sys/atomic.h +++ b/include/sys/atomic.h @@ -30,7 +30,14 @@ #include <linux/module.h> #include <linux/spinlock.h> #include <sys/types.h> -#include <asm/atomic_compat.h> + +#ifndef HAVE_ATOMIC64_CMPXCHG +#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) +#endif + +#ifndef HAVE_ATOMIC64_XCHG +#define atomic64_xchg(v, n) (xchg(&((v)->counter), n)) +#endif /* * Two approaches to atomic operations are implemented each with its |