]> git.proxmox.com Git - mirror_spl.git/blobdiff - include/sys/atomic.h
Atomic64 compatibility for 32-bit systems without kernel support.
[mirror_spl.git] / include / sys / atomic.h
index 7a741de175937e0e8e82a8e826b711e80c0f4902..f522781fc81496cab85b5be2ebe162771bd25b9a 100644 (file)
 #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