Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jan 2017 21:02:30 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311170 - head/sys/cddl/compat/opensolaris/sys
Message-ID:  <201701032102.v03L2UPb096984@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Tue Jan  3 21:02:30 2017
New Revision: 311170
URL: https://svnweb.freebsd.org/changeset/base/311170

Log:
  Revert r309619 "ifndef atomic_cas_* in cddl code"
  
  It was a temporary change to ease an import of native atomic_cas primitives.
  Instead, atomic_fcmpset was devised with different semantics. See r311168.

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	Tue Jan  3 21:00:24 2017	(r311169)
+++ head/sys/cddl/compat/opensolaris/sys/atomic.h	Tue Jan  3 21:02:30 2017	(r311170)
@@ -41,15 +41,11 @@ extern void atomic_add_64(volatile uint6
 extern void atomic_dec_64(volatile uint64_t *target);
 #endif
 #ifndef __sparc64__
-#ifndef atomic_cas_32
 extern uint32_t atomic_cas_32(volatile uint32_t *target, uint32_t cmp,
     uint32_t newval);
-#endif
-#ifndef atomic_cas_64
 extern uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
     uint64_t newval);
 #endif
-#endif
 extern uint64_t atomic_add_64_nv(volatile uint64_t *target, int64_t delta);
 extern uint8_t atomic_or_8_nv(volatile uint8_t *target, uint8_t value);
 extern void membar_producer(void);
@@ -127,7 +123,6 @@ atomic_dec_64_nv(volatile uint64_t *targ
 	return (atomic_add_64_nv(target, -1));
 }
 
-#ifndef atomic_cas_ptr
 #if !defined(COMPAT_32BIT) && defined(__LP64__)
 static __inline void *
 atomic_cas_ptr(volatile void *target, void *cmp,  void *newval)
@@ -143,6 +138,5 @@ atomic_cas_ptr(volatile void *target, vo
 	    (uint32_t)cmp, (uint32_t)newval));
 }
 #endif	/* !defined(COMPAT_32BIT) && defined(__LP64__) */
-#endif
 
 #endif	/* !_OPENSOLARIS_SYS_ATOMIC_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701032102.v03L2UPb096984>