diff options
author | delphij <delphij@FreeBSD.org> | 2014-09-03 08:24:11 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-09-03 08:24:11 +0000 |
commit | 4910deb0fcf65a3546947b9f267113a4032d466b (patch) | |
tree | 15df90a94654ab97a92dea20d137e24273009527 /sys/cddl/compat | |
parent | 0afc26f706725f3781537c1927202408705f92f8 (diff) | |
download | FreeBSD-src-4910deb0fcf65a3546947b9f267113a4032d466b.zip FreeBSD-src-4910deb0fcf65a3546947b9f267113a4032d466b.tar.gz |
MFC r270260:
Provide compatibility shim for atomic_dec_64_nv.
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/atomic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/atomic.h b/sys/cddl/compat/opensolaris/sys/atomic.h index 65c9e71..9b81876 100644 --- a/sys/cddl/compat/opensolaris/sys/atomic.h +++ b/sys/cddl/compat/opensolaris/sys/atomic.h @@ -117,6 +117,12 @@ atomic_inc_64_nv(volatile uint64_t *target) return (atomic_add_64_nv(target, 1)); } +static __inline uint64_t +atomic_dec_64_nv(volatile uint64_t *target) +{ + return (atomic_add_64_nv(target, -1)); +} + #if !defined(COMPAT_32BIT) && defined(__LP64__) static __inline void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) |