16 lines
436 B
Diff
16 lines
436 B
Diff
|
--- 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 *);
|