Skip to content

Commit

Permalink
fix c11 atomics
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Dec 10, 2024
1 parent ef25411 commit 601deb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ typedef struct {
#define __ATOMIC_SUB_RETURN(v, p) __atomic_sub_fetch(p, v, __ATOMIC_RELAXED)
#define __ATOMIC_SUB_RETURN_RELEASE(v, p) \
__atomic_sub_fetch(p, v, __ATOMIC_RELEASE)
#define __ATOMIC_AND(p) __atomic_and_fetch(p, v, __ATOMIC_RELAXED)
#define __ATOMIC_OR(p) __atomic_or_fetch(p, v, __ATOMIC_RELAXED)
#define __ATOMIC_AND(v, p) __atomic_and_fetch(&(p)->counter, v, __ATOMIC_RELAXED)
#define __ATOMIC_OR(v, p) __atomic_or_fetch(&(p)->counter, v, __ATOMIC_RELAXED)

#define xchg(p, v) __atomic_exchange_n(p, v, __ATOMIC_SEQ_CST)
#define xchg_acquire(p, v) __atomic_exchange_n(p, v, __ATOMIC_ACQUIRE)

#define try_cmpxchg(p, old, new) \
__atomic_compare_exchange_n((p), __old, new, false, \
__atomic_compare_exchange_n((p), old, new, false, \
__ATOMIC_SEQ_CST, \
__ATOMIC_SEQ_CST)

Expand Down

0 comments on commit 601deb6

Please sign in to comment.