summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2013-08-18 19:37:35 +0000
committertijl <tijl@FreeBSD.org>2013-08-18 19:37:35 +0000
commit61dbe4f5af02202c12ec459e7ee9e7b3374c8126 (patch)
treea7da1f5f1eb00a6f88ea8e74a9628330ddd80b0f
parent2fe1b528a90e21592c13868df75e787ff330d3d7 (diff)
downloadFreeBSD-src-61dbe4f5af02202c12ec459e7ee9e7b3374c8126.zip
FreeBSD-src-61dbe4f5af02202c12ec459e7ee9e7b3374c8126.tar.gz
Change the return type of the fallback implementation of the
atomic_compare_exchange_* macros in stdatomic.h to _Bool.
-rw-r--r--sys/sys/stdatomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h
index 37c3a06..b55d388 100644
--- a/sys/sys/stdatomic.h
+++ b/sys/sys/stdatomic.h
@@ -288,8 +288,8 @@ typedef _Atomic(__uintmax_t) atomic_uintmax_t;
__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) \
OpenPOWER on IntegriCloud