|
@@ -4,6 +4,8 @@
|
|
#include <linux/compiler.h>
|
|
#include <linux/compiler.h>
|
|
#include <asm/alternative.h> /* Provides LOCK_PREFIX */
|
|
#include <asm/alternative.h> /* Provides LOCK_PREFIX */
|
|
|
|
|
|
|
|
+#define __HAVE_ARCH_CMPXCHG 1
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Non-existant functions to indicate usage errors at link time
|
|
* Non-existant functions to indicate usage errors at link time
|
|
* (or compile-time if the compiler implements __compiletime_error().
|
|
* (or compile-time if the compiler implements __compiletime_error().
|
|
@@ -143,7 +145,6 @@ extern void __add_wrong_size(void)
|
|
# include <asm/cmpxchg_64.h>
|
|
# include <asm/cmpxchg_64.h>
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#ifdef __HAVE_ARCH_CMPXCHG
|
|
|
|
#define cmpxchg(ptr, old, new) \
|
|
#define cmpxchg(ptr, old, new) \
|
|
__cmpxchg(ptr, old, new, sizeof(*(ptr)))
|
|
__cmpxchg(ptr, old, new, sizeof(*(ptr)))
|
|
|
|
|
|
@@ -152,7 +153,6 @@ extern void __add_wrong_size(void)
|
|
|
|
|
|
#define cmpxchg_local(ptr, old, new) \
|
|
#define cmpxchg_local(ptr, old, new) \
|
|
__cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
|
|
__cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
|
|
-#endif
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* xadd() adds "inc" to "*ptr" and atomically returns the previous
|
|
* xadd() adds "inc" to "*ptr" and atomically returns the previous
|