summaryrefslogtreecommitdiff
path: root/include/linux/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/atomic.h')
-rw-r--r--include/linux/atomic.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/atomic.h b/include/linux/atomic.h
index f4d047c1..f1464cf3 100644
--- a/include/linux/atomic.h
+++ b/include/linux/atomic.h
@@ -47,6 +47,7 @@ typedef struct {
#define smp_rmb() cmm_smp_rmb()
#define smp_mb() cmm_smp_mb()
#define smp_read_barrier_depends() cmm_smp_read_barrier_depends()
+#define smp_acquire__after_ctrl_dep() cmm_smp_mb()
#else /* C11_ATOMICS */
@@ -205,6 +206,11 @@ static inline i_type a_type##_dec_return(a_type##_t *v) \
return __ATOMIC_DEC_RETURN(&v->counter); \
} \
\
+static inline i_type a_type##_dec_return_release(a_type##_t *v) \
+{ \
+ return __ATOMIC_SUB_RETURN_RELEASE(1, &v->counter); \
+} \
+ \
static inline void a_type##_inc(a_type##_t *v) \
{ \
__ATOMIC_INC(&v->counter); \