ifndef cmpxchg_relaxed define cmpxchg_relaxed cmpxchg endif ifndef __a

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#ifndef cmpxchg_relaxed
# define cmpxchg_relaxed cmpxchg
#endif
#ifndef __atomic_op_acquire
# define __atomic_op_acquire(op, args...) \
({ \
typeof(op##_relaxed(args)) __ret = op##_relaxed(args); \
barrier(); \
__ret; \
})
#endif
#ifndef cmpxchg_acquire
#warning "using cmpxchg_acquire declared by lkm developers"
# define cmpxchg_acquire(...) \
__atomic_op_acquire(cmpxchg, __VA_ARGS__)
#endif