diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-12-10 16:15:54 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-12-10 16:16:05 -0500 |
commit | 601deb6e5d56fecb8cd403c63516bd0b4a14e7a9 (patch) | |
tree | 900a0febea9d96cd4c0e65d4ad404792b1a41686 | |
parent | ef25411bdcbd20c46380f38b3d07dfc21497154f (diff) |
fix c11 atomics
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | include/linux/atomic.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index c594ff8b..f7b2619a 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h @@ -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) |