Quantcast
Channel: How to atomically perform sequential load and store operations? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Krzysztof Narkowicz for How to atomically perform sequential load...

In theory atomic variable swap could be implemented on a few CPUs with DCAS support. In practice no modern CPU has DCAS support, so it's not possible.

View Article


Answer by wilx for How to atomically perform sequential load and store...

I do not think that is possible. I do not think it is useful to have such operation. Why do you want it? If you have such hard requirement then you should just use std::mutex locked around a = b...

View Article

How to atomically perform sequential load and store operations?

Consider this code under GCC 4.8.0:std::atomic<bool> a;std::atomic<bool> b;a.store( b.load() ); // want to be atomicHow can I make the line above to be atomic as whole? In other words, how...

View Article
Browsing all 3 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>