]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86_64/atomic.h
Merge branch 'upstream-jgarzik' of git://git.tuxdriver.com/git/wireless-2.6
[linux-2.6-omap-h63xx.git] / include / asm-x86_64 / atomic.h
index 72eb071488c77e98130d8ddb326c18850c8112c3..4b5cd553e772637d157b0af95edbd89d7e12eb1a 100644 (file)
@@ -2,6 +2,7 @@
 #define __ARCH_X86_64_ATOMIC__
 
 #include <linux/config.h>
+#include <asm/types.h>
 
 /* atomic_t should be 32 bit signed type */
 
@@ -389,6 +390,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t *v)
 #define atomic64_dec_return(v)  (atomic64_sub_return(1,v))
 
 #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 /**
  * atomic_add_unless - add unless the number is a given value