void-packages/srcpkgs/bcachefs-tools/patches/32bit.patch

16 lines
436 B
Diff
Raw Normal View History

2023-12-20 19:41:36 +01:00
--- a/include/linux/atomic.h
+++ b/include/linux/atomic.h
@@ -300,6 +300,12 @@
DEF_ATOMIC_OPS(atomic64, s64)
#else
s64 atomic64_read(const atomic64_t *v);
+static inline s64 atomic64_read_acquire(const atomic64_t *v) \
+{ \
+ s64 ret = atomic64_read(&v->counter); \
+ smp_mb__after_atomic(); \
+ return ret; \
+} \
void atomic64_set(atomic64_t *v, s64);
s64 atomic64_add_return(s64, atomic64_t *);