#define atomic_andnot atomic_andnot
#define atomic64_andnot atomic64_andnot
-#define atomic_fetch_or atomic_fetch_or
-
#undef ATOMIC_OPS
#define ATOMIC_OPS(op, asm) \
ATOMIC_OP(op, asm) \
#define atomic_andnot atomic_andnot
-#define atomic_fetch_or atomic_fetch_or
-
#undef ATOMIC_OPS
#define ATOMIC_OPS(op, c_op, asm_op) \
ATOMIC_OP(op, c_op, asm_op) \
return val; \
}
-#define atomic_fetch_or atomic_fetch_or
-
static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
{
int ret;
#define __atomic_add_unless(v, a, u) ___atomic_add_unless(v, a, u,)
#define atomic_andnot atomic_andnot
-#define atomic_fetch_or atomic_fetch_or
-
/*
* 64-bit atomic operations.
*/
ATOMIC_FETCH_OP (sub, sub, rKs21)
ATOMIC_FETCH_OP (add, add, r)
-#define atomic_fetch_or atomic_fetch_or
-
#define ATOMIC_OPS(op, asm_op) \
ATOMIC_OP_RETURN(op, asm_op, r) \
static inline void atomic_##op(int i, atomic_t *v) \
#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)
-#define atomic_fetch_or atomic_fetch_or
-
/*
* 64-bit atomic ops
*/
ATOMIC_OP_RETURN(add, +=)
ATOMIC_OP_RETURN(sub, -=)
-#define atomic_fetch_or atomic_fetch_or
-
#define ATOMIC_OPS(op, c_op) \
ATOMIC_OP(op, c_op) \
ATOMIC_FETCH_OP(op, c_op)
#undef ATOMIC_OPS
#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and)
ATOMIC_OPS(or)
ATOMIC_OPS(xor)
#undef ATOMIC_OPS
#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and)
ATOMIC_OPS(or)
ATOMIC_OPS(xor)
ATOMIC_OP(op, c_op, asm_op) \
ATOMIC_FETCH_OP(op, c_op, asm_op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and, &=, and)
ATOMIC_OPS(or, |=, or)
ATOMIC_OPS(xor, ^=, eor)
#include <asm/atomic_lnkget.h>
#endif
-#define atomic_fetch_or atomic_fetch_or
-
#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
#define atomic_dec_return(v) atomic_sub_return(1, (v))
ATOMIC_OP(op, c_op, asm_op) \
ATOMIC_FETCH_OP(op, c_op, asm_op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and, &=, and)
ATOMIC_OPS(or, |=, or)
ATOMIC_OPS(xor, ^=, xor)
#undef ATOMIC_OPS
#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and)
ATOMIC_OPS(or)
ATOMIC_OPS(xor)
ATOMIC_OP(op, c_op) \
ATOMIC_FETCH_OP(op, c_op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and, &=)
ATOMIC_OPS(or, |=)
ATOMIC_OPS(xor, ^=)
return __ATOMIC_LOOP(v, i, __ATOMIC_##OP, __ATOMIC_BARRIER); \
}
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and, AND)
ATOMIC_OPS(or, OR)
ATOMIC_OPS(xor, XOR)
#include <asm/atomic-irq.h>
#endif
-#define atomic_fetch_or atomic_fetch_or
-
#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
#define atomic_dec_return(v) atomic_sub_return(1, (v))
#define atomic_inc_return(v) atomic_add_return(1, (v))
#else
#include <asm/atomic_32.h>
#endif
-#define atomic_fetch_or atomic_fetch_or
#endif
#define atomic_inc(v) ((void)atomic_add_return( 1, (v)))
#define atomic_dec(v) ((void)atomic_add_return( -1, (v)))
-#define atomic_fetch_or atomic_fetch_or
-
#define atomic_and(i, v) ((void)atomic_fetch_and((i), (v)))
#define atomic_or(i, v) ((void)atomic_fetch_or((i), (v)))
#define atomic_xor(i, v) ((void)atomic_fetch_xor((i), (v)))
#define atomic_fetch_sub(i, v) atomic_fetch_add(-(int)(i), (v))
-#define atomic_fetch_or atomic_fetch_or
-
/**
* atomic_sub - subtract integer from atomic variable
* @i: integer value to subtract
ATOMIC_OP(op) \
ATOMIC_FETCH_OP(op, c_op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and, &)
ATOMIC_OPS(or , |)
ATOMIC_OPS(xor, ^)
#undef ATOMIC_OPS
#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_OPS(and)
ATOMIC_OPS(or)
ATOMIC_OPS(xor)
#endif
#ifndef atomic_fetch_or
-#define atomic_fetch_or atomic_fetch_or
-
ATOMIC_FETCH_OP(or, |)
#endif
}
#endif
-/**
- * atomic_fetch_or - perform *p |= mask and return old value of *p
- * @mask: mask to OR on the atomic_t
- * @p: pointer to atomic_t
- */
-#ifndef atomic_fetch_or
-static inline int atomic_fetch_or(int mask, atomic_t *p)
-{
- int old, val = atomic_read(p);
-
- for (;;) {
- old = atomic_cmpxchg(p, val, val | mask);
- if (old == val)
- break;
- val = old;
- }
-
- return old;
-}
-#endif
-
#ifdef CONFIG_GENERIC_ATOMIC64
#include <asm-generic/atomic64.h>
#endif