Quantcast
Channel: Are std::atomic loads and stores both required? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by supercat for Are std::atomic loads and stores both required?

The Standard is designed to be supportable on platforms with weird and bizarre memory semantics. Too accommodate this, it avoids imposing any requirements upon how implementations handle any constructs...

View Article



Answer by Brian Bi for Are std::atomic loads and stores both required?

You cannot perform a non-atomic store or load on an atomic variable. The API ensures that there is no way to attempt it. Your allegedly "non-atomic store",ptr = some_ptr;is actually an atomic store...

View Article

Are std::atomic loads and stores both required?

According to this article:Any time two threads operate on a shared variable concurrently, and one of those operations performs a write, both threads must use atomic operations.However, if a...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images