Partial commit: Utilities

This commit is contained in:
Nekotekina 2016-02-02 00:55:43 +03:00
parent 5fc6f59821
commit 250ce63527
37 changed files with 4783 additions and 4007 deletions

View file

@ -10,7 +10,7 @@ bool semaphore_t::try_wait()
}
// try to decrement m_value atomically
const auto old = m_var.atomic_op([](sync_var_t& var)
const auto old = m_var.fetch_op([](sync_var_t& var)
{
if (var.value)
{
@ -36,7 +36,7 @@ bool semaphore_t::try_post()
}
// try to increment m_value atomically
const auto old = m_var.atomic_op([&](sync_var_t& var)
const auto old = m_var.fetch_op([&](sync_var_t& var)
{
if (var.value < max_value)
{