Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Aug 2013 19:37:35 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254497 - head/sys/sys
Message-ID:  <201308181937.r7IJbZQW051722@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)						\



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