forked from GerhardHoffmann/DCLibraries
		
	Added comment for std::atomic<bool>::exchange()
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user