summaryrefslogtreecommitdiff
path: root/include/linux/atomic.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-06-28 18:11:46 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-06-28 18:26:04 -0400
commit34b5654d9eb1999704e75d964645e3aa9b78e249 (patch)
tree27269b040f9128cf33155a9ca47038703efc5606 /include/linux/atomic.h
parentb0eb3c29304f9a4ca39c8534bb6476b170b2a7d0 (diff)
Update bcachefs sources to 9404a01d3dc5 bcachefs: Make read_only a mount option again, but hiddenv1.9.2
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/atomic.h')
-rw-r--r--include/linux/atomic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/atomic.h b/include/linux/atomic.h
index 73024023..dcc6e644 100644
--- a/include/linux/atomic.h
+++ b/include/linux/atomic.h
@@ -26,6 +26,7 @@ typedef struct {
#define __ATOMIC_READ(p) uatomic_read(p)
#define __ATOMIC_SET(p, v) uatomic_set(p, v)
+#define __ATOMIC_SET_RELEASE(p, v) uatomic_set(p, v)
#define __ATOMIC_ADD_RETURN(v, p) uatomic_add_return(p, v)
#define __ATOMIC_SUB_RETURN(v, p) uatomic_sub_return(p, v)
#define __ATOMIC_ADD(v, p) uatomic_add(p, v)
@@ -64,6 +65,7 @@ typedef struct {
#define __ATOMIC_READ(p) __atomic_load_n(p, __ATOMIC_RELAXED)
#define __ATOMIC_SET(p, v) __atomic_store_n(p, v, __ATOMIC_RELAXED)
+#define __ATOMIC_SET_RELEASE(p, v) __atomic_store_n(p, v, __ATOMIC_RELEASE)
#define __ATOMIC_ADD_RETURN(v, p) __atomic_add_fetch(p, v, __ATOMIC_RELAXED)
#define __ATOMIC_ADD_RETURN_RELEASE(v, p) \
__atomic_add_fetch(p, v, __ATOMIC_RELEASE)
@@ -189,6 +191,11 @@ static inline void a_type##_set(a_type##_t *v, i_type i) \
return __ATOMIC_SET(&v->counter, i); \
} \
\
+static inline void a_type##_set_release(a_type##_t *v, i_type i) \
+{ \
+ return __ATOMIC_SET_RELEASE(&v->counter, i); \
+} \
+ \
static inline i_type a_type##_add_return(i_type i, a_type##_t *v) \
{ \
return __ATOMIC_ADD_RETURN(i, &v->counter); \