]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Stop requiring same memory ordering in win32 atomic_compare_exchange functions
authorOndřej Surý <ondrej@sury.org>
Thu, 20 Jun 2019 16:51:36 +0000 (18:51 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 13 Feb 2020 14:16:06 +0000 (15:16 +0100)
lib/isc/win32/include/isc/stdatomic.h

index 1d4ae203ce2ca2f6a7cf4a5960c33ecb7f354af6..38c699f70cc174b65052636ccacb659713516da6 100644 (file)
@@ -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: