cond_variable: fix warning in cond.h for MSVC

This commit is contained in:
Nekotekina 2019-09-20 15:40:50 +03:00
parent e7d67f9732
commit 3121fecc8f
2 changed files with 4 additions and 2 deletions

View File

@ -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)
{

View File

@ -29,7 +29,8 @@ protected:
return 0;
}
value += c_waiter_mask & -c_waiter_mask;
// Add waiter (c_waiter_mask)
value += 1;
return value;
});
}