diff options
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_base.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 9ec9864ecf38..b106240d8385 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -903,4 +903,18 @@ struct se_wwn { struct config_group fabric_stat_group; }; +static inline void atomic_inc_mb(atomic_t *v) +{ + smp_mb__before_atomic(); + atomic_inc(v); + smp_mb__after_atomic(); +} + +static inline void atomic_dec_mb(atomic_t *v) +{ + smp_mb__before_atomic(); + atomic_dec(v); + smp_mb__after_atomic(); +} + #endif /* TARGET_CORE_BASE_H */ |