|
@@ -83,7 +83,11 @@ ATOMIC_OPS(xor)
|
|
#define atomic64_add_negative(i, v) (atomic64_add_return(i, v) < 0)
|
|
#define atomic64_add_negative(i, v) (atomic64_add_return(i, v) < 0)
|
|
|
|
|
|
#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
|
|
#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
|
|
-#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
|
|
|
|
|
|
+
|
|
|
|
+static inline int atomic_xchg(atomic_t *v, int new)
|
|
|
|
+{
|
|
|
|
+ return xchg(&v->counter, new);
|
|
|
|
+}
|
|
|
|
|
|
static inline int __atomic_add_unless(atomic_t *v, int a, int u)
|
|
static inline int __atomic_add_unless(atomic_t *v, int a, int u)
|
|
{
|
|
{
|