summaryrefslogtreecommitdiff
path: root/include/my_atomic.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-12-11 15:57:21 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-12-11 15:57:51 +0200
commit8695c816e7a0ebc6f2922ce1e1da4f2c50933509 (patch)
tree0371679c772d19d6d5098de456c97991996687d3 /include/my_atomic.h
parente312a407b888b3107bc7a2ca3303b588ab4560c0 (diff)
downloadmariadb-git-8695c816e7a0ebc6f2922ce1e1da4f2c50933509.tar.gz
Wrap __atomic_compare_exchange_n() as valid C
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r--include/my_atomic.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h
index c6abcda2d62..237efdd952b 100644
--- a/include/my_atomic.h
+++ b/include/my_atomic.h
@@ -374,18 +374,18 @@ extern int my_atomic_initialize();
#define my_atomic_add64_explicit(P, A, O) __atomic_fetch_add((P), (A), (O))
#define my_atomic_cas32_weak_explicit(P, E, D, S, F) \
- __atomic_compare_exchange_n((P), (E), (D), true, (S), (F))
+ __atomic_compare_exchange_n((P), (E), (D), 1, (S), (F))
#define my_atomic_cas64_weak_explicit(P, E, D, S, F) \
- __atomic_compare_exchange_n((P), (E), (D), true, (S), (F))
+ __atomic_compare_exchange_n((P), (E), (D), 1, (S), (F))
#define my_atomic_casptr_weak_explicit(P, E, D, S, F) \
- __atomic_compare_exchange_n((P), (E), (D), true, (S), (F))
+ __atomic_compare_exchange_n((P), (E), (D), 1, (S), (F))
#define my_atomic_cas32_strong_explicit(P, E, D, S, F) \
- __atomic_compare_exchange_n((P), (E), (D), false, (S), (F))
+ __atomic_compare_exchange_n((P), (E), (D), 0, (S), (F))
#define my_atomic_cas64_strong_explicit(P, E, D, S, F) \
- __atomic_compare_exchange_n((P), (E), (D), false, (S), (F))
+ __atomic_compare_exchange_n((P), (E), (D), 0, (S), (F))
#define my_atomic_casptr_strong_explicit(P, E, D, S, F) \
- __atomic_compare_exchange_n((P), (E), (D), false, (S), (F))
+ __atomic_compare_exchange_n((P), (E), (D), 0, (S), (F))
#else
#define MY_MEMORY_ORDER_RELAXED
#define MY_MEMORY_ORDER_CONSUME