Added comment for std::atomic<bool>::exchange()
This commit is contained in:
parent
aa10d3b275
commit
9cac6a6461
@ -49,6 +49,9 @@ void T_runProc::runProc_slotProcess(void)
|
||||
{
|
||||
#ifndef THIS_IS_CA_MASTER
|
||||
bool const coinAttached = epi_getDI_CoinAttach();
|
||||
// exchange: (atomically) replaces the underlying value of m_coinAttached
|
||||
// with the value of coinAttached, returns the value of m_coinAttached
|
||||
// before the call
|
||||
if (m_coinAttached.exchange(coinAttached) == false) {
|
||||
if (coinAttached) {
|
||||
// old value was false, and new value is true
|
||||
|
Loading…
Reference in New Issue
Block a user