Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2001-08-18 14:36:05

I apologize in advance if this has already been brought up...

In semaphore.html, up is described as:

    unsigned ct;
    bool ret;
    { // as a single atomic operation:
         ct = m_count;
         if (m_count == m_max) ret = false;
             ret = true;
    if (prev) *prev = m_count;
    return ret;

Should the final line be instead:

    if (prev) *prev = ct;


Otherwise it seems as if the ct variable has no use.


Boost list run by bdawes at, gregod at, cpdaniel at, john at