Commit 098f6879 authored by Ondřej Surý's avatar Ondřej Surý

Merge branch 'ondrej/win32-stdatomic-fix-v9_14' into 'v9_14'

Stop requiring same memory ordering in win32 atomic_compare_exchange functions

See merge request !3059
parents 596b94db a3777800
Pipeline #34355 failed with stages
in 90 minutes and 8 seconds
......@@ -314,7 +314,10 @@ atomic_compare_exchange_strong_explicit8(atomic_int_fast8_t *obj,
{
bool __r;
int8_t __v;
REQUIRE(succ == fail);
UNUSED(succ);
UNUSED(fail);
__v = InterlockedCompareExchange8((atomic_int_fast8_t *)obj, desired, *expected);
__r = (*(expected) == __v);
if (!__r) {
......@@ -331,7 +334,10 @@ atomic_compare_exchange_strong_explicit32(atomic_int_fast32_t *obj,
memory_order fail) {
bool __r;
int32_t __v;
REQUIRE(succ == fail);
UNUSED(succ);
UNUSED(fail);
switch (succ) {
case memory_order_relaxed:
__v = InterlockedCompareExchangeNoFence((atomic_int_fast32_t *)obj, desired, *expected);
......@@ -361,7 +367,10 @@ atomic_compare_exchange_strong_explicit64(atomic_int_fast64_t *obj,
memory_order fail) {
bool __r;
int64_t __v;
REQUIRE(succ == fail);
UNUSED(succ);
UNUSED(fail);
#ifdef _WIN64
switch (succ) {
case memory_order_relaxed:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment