Message ID | 20190315143318.4714-4-luca@coelho.fi (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | backport: some patches from our internal tree 2019-03-15 | expand |
diff --git a/backport/backport-include/linux/atomic.h b/backport/backport-include/linux/atomic.h index b4dd2e1d34f0..9ceb586e864a 100644 --- a/backport/backport-include/linux/atomic.h +++ b/backport/backport-include/linux/atomic.h @@ -51,4 +51,13 @@ #endif /* atomic_try_cmpxchg_acquire */ +#if LINUX_VERSION_IS_LESS(4,19,0) +#ifndef atomic_fetch_add_unless +static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u) +{ + return __atomic_add_unless(v, a, u); +} +#endif +#endif + #endif /* __BP_ATOMIC_H */