From 3121fecc8f6822793f5b658f39b75127507a853f Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 20 Sep 2019 15:40:50 +0300 Subject: [PATCH] cond_variable: fix warning in cond.h for MSVC --- Utilities/cond.cpp | 3 ++- Utilities/cond.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Utilities/cond.cpp b/Utilities/cond.cpp index f62aab8686..96f0bdb99e 100644 --- a/Utilities/cond.cpp +++ b/Utilities/cond.cpp @@ -17,7 +17,8 @@ void cond_variable::imp_wait(u32 _old, u64 _timeout) noexcept // Cleanup m_value.atomic_op([](u32& value) { - value -= c_waiter_mask & -c_waiter_mask; + // Remove waiter (c_waiter_mask) + value -= 1; if ((value & c_waiter_mask) == 0) { diff --git a/Utilities/cond.h b/Utilities/cond.h index 94ac173d13..14de60ff09 100644 --- a/Utilities/cond.h +++ b/Utilities/cond.h @@ -29,7 +29,8 @@ protected: return 0; } - value += c_waiter_mask & -c_waiter_mask; + // Add waiter (c_waiter_mask) + value += 1; return value; }); }