svn commit: r270260 - head/sys/cddl/compat/opensolaris/sys

Xin LI delphij at FreeBSD.org
Thu Aug 21 08:25:47 UTC 2014


Author: delphij
Date: Thu Aug 21 08:25:46 2014
New Revision: 270260
URL: http://svnweb.freebsd.org/changeset/base/270260

Log:
  Provide compatibility shim for atomic_dec_64_nv.
  
  X-MFC-with:	r270247
  MFC after:	13 days

Modified:
  head/sys/cddl/compat/opensolaris/sys/atomic.h

Modified: head/sys/cddl/compat/opensolaris/sys/atomic.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/atomic.h	Thu Aug 21 07:52:51 2014	(r270259)
+++ head/sys/cddl/compat/opensolaris/sys/atomic.h	Thu Aug 21 08:25:46 2014	(r270260)
@@ -117,6 +117,12 @@ atomic_inc_64_nv(volatile uint64_t *targ
 	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)


More information about the svn-src-all mailing list