Use attributes for LIKELY/UNLIKELY

Remove LIKELY/UNLIKELY macro.
This commit is contained in:
Nekotekina 2020-02-05 10:00:08 +03:00
parent 49e11b7cfd
commit c0f80cfe7a
56 changed files with 482 additions and 493 deletions

View file

@ -26,7 +26,7 @@ protected:
const s32 value = m_value.load();
// Conditional decrement
if (UNLIKELY(value <= 0 || !m_value.compare_and_swap_test(value, value - 1)))
if (value <= 0 || !m_value.compare_and_swap_test(value, value - 1)) [[unlikely]]
{
imp_wait();
}
@ -42,7 +42,7 @@ protected:
// Unconditional increment
const s32 value = m_value.fetch_add(1);
if (UNLIKELY(value < 0 || value >= _max))
if (value < 0 || value >= _max) [[unlikely]]
{
imp_post(value);
}