diff --git a/sys/compat/linuxkpi/common/include/asm/atomic64.h b/sys/compat/linuxkpi/common/include/asm/atomic64.h --- a/sys/compat/linuxkpi/common/include/asm/atomic64.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic64.h @@ -52,6 +52,12 @@ #define atomic64_dec_return(v) atomic64_sub_return(1, (v)) #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) +static inline int64_t +atomic64_fetch_add(int64_t i, atomic64_t *v) +{ + return (atomic_fetchadd_64(&v->counter, i)); +} + static inline int64_t atomic64_add_return(int64_t i, atomic64_t *v) {