svn commit: r254497 - head/sys/sys

Tijl Coosemans tijl at FreeBSD.org
Sun Aug 18 19:37:35 UTC 2013


Author: tijl
Date: Sun Aug 18 19:37:35 2013
New Revision: 254497
URL: http://svnweb.freebsd.org/changeset/base/254497

Log:
  Change the return type of the fallback implementation of the
  atomic_compare_exchange_* macros in stdatomic.h to _Bool.

Modified:
  head/sys/sys/stdatomic.h

Modified: head/sys/sys/stdatomic.h
==============================================================================
--- head/sys/sys/stdatomic.h	Sun Aug 18 19:08:53 2013	(r254496)
+++ head/sys/sys/stdatomic.h	Sun Aug 18 19:37:35 2013	(r254497)
@@ -288,8 +288,8 @@ typedef _Atomic(__uintmax_t)		atomic_uin
 	__typeof__(expected) __ep = (expected);				\
 	__typeof__(*__ep) __e = *__ep;					\
 	(void)(success); (void)(failure);				\
-	(*__ep = __sync_val_compare_and_swap(&(object)->__val,		\
-	    __e, desired)) == __e;					\
+	(_Bool)((*__ep = __sync_val_compare_and_swap(&(object)->__val,	\
+	    __e, desired)) == __e);					\
 })
 #define	atomic_compare_exchange_weak_explicit(object, expected,		\
     desired, success, failure)						\


More information about the svn-src-all mailing list