5
5
6
6
#define arch_atomic_set (v , i ) WRITE_ONCE(((v)->counter), (i))
7
7
8
- #define ATOMIC_OP (op , c_op , asm_op ) \
8
+ #define ATOMIC_OP (op , asm_op ) \
9
9
static inline void arch_atomic_##op(int i, atomic_t *v) \
10
10
{ \
11
11
unsigned int val; \
@@ -21,7 +21,7 @@ static inline void arch_atomic_##op(int i, atomic_t *v) \
21
21
: "cc"); \
22
22
} \
23
23
24
- #define ATOMIC_OP_RETURN (op , c_op , asm_op ) \
24
+ #define ATOMIC_OP_RETURN (op , asm_op ) \
25
25
static inline int arch_atomic_##op##_return_relaxed(int i, atomic_t *v) \
26
26
{ \
27
27
unsigned int val; \
@@ -42,7 +42,7 @@ static inline int arch_atomic_##op##_return_relaxed(int i, atomic_t *v) \
42
42
#define arch_atomic_add_return_relaxed arch_atomic_add_return_relaxed
43
43
#define arch_atomic_sub_return_relaxed arch_atomic_sub_return_relaxed
44
44
45
- #define ATOMIC_FETCH_OP (op , c_op , asm_op ) \
45
+ #define ATOMIC_FETCH_OP (op , asm_op ) \
46
46
static inline int arch_atomic_fetch_##op##_relaxed(int i, atomic_t *v) \
47
47
{ \
48
48
unsigned int val, orig; \
@@ -69,23 +69,23 @@ static inline int arch_atomic_fetch_##op##_relaxed(int i, atomic_t *v) \
69
69
#define arch_atomic_fetch_or_relaxed arch_atomic_fetch_or_relaxed
70
70
#define arch_atomic_fetch_xor_relaxed arch_atomic_fetch_xor_relaxed
71
71
72
- #define ATOMIC_OPS (op , c_op , asm_op ) \
73
- ATOMIC_OP(op, c_op, asm_op) \
74
- ATOMIC_OP_RETURN(op, c_op, asm_op) \
75
- ATOMIC_FETCH_OP(op, c_op, asm_op)
72
+ #define ATOMIC_OPS (op , asm_op ) \
73
+ ATOMIC_OP(op, asm_op) \
74
+ ATOMIC_OP_RETURN(op, asm_op) \
75
+ ATOMIC_FETCH_OP(op, asm_op)
76
76
77
- ATOMIC_OPS (add , + = , add )
78
- ATOMIC_OPS (sub , - = , sub )
77
+ ATOMIC_OPS (add , add )
78
+ ATOMIC_OPS (sub , sub )
79
79
80
80
#undef ATOMIC_OPS
81
- #define ATOMIC_OPS (op , c_op , asm_op ) \
82
- ATOMIC_OP(op, c_op, asm_op) \
83
- ATOMIC_FETCH_OP(op, c_op, asm_op)
81
+ #define ATOMIC_OPS (op , asm_op ) \
82
+ ATOMIC_OP(op, asm_op) \
83
+ ATOMIC_FETCH_OP(op, asm_op)
84
84
85
- ATOMIC_OPS (and , & = , and )
86
- ATOMIC_OPS (andnot , & = ~, bic )
87
- ATOMIC_OPS (or , |=, or )
88
- ATOMIC_OPS (xor , ^=, xor )
85
+ ATOMIC_OPS (and , and )
86
+ ATOMIC_OPS (andnot , bic )
87
+ ATOMIC_OPS (or , or )
88
+ ATOMIC_OPS (xor , xor )
89
89
90
90
#define arch_atomic_andnot arch_atomic_andnot
91
91
0 commit comments