Answer by Peter Cordes for Two Different Processes With 2 std::atomic...
On all mainstream platforms, std::atomic<T> does have the same size as T, although possibly higher alignment requirement if T has alignof < sizeof.You can check these assumptions with:...
View ArticleAnswer by Paul Sanders for Two Different Processes With 2 std::atomic...
Yes, the C++ standard is a bit mealy-mouthed about all this.If you are on Windows (which you probably aren't) then you can use InterlockedExchange() etc, which offer all the required semantics and...
View ArticleAnswer by Passer By for Two Different Processes With 2 std::atomic Variables...
The C++ standard doesn't concern itself with multiple processes and no guarantees were given outside of a multi-threaded environment.However, the standard does recommend that implementations of...
View ArticleTwo Different Processes With 2 std::atomic Variables on Same Address?
I read C++ Standard (n4713)'s § 32.6.1 3:Operations that are lock-free should also be address-free. That is, atomic operations on the same memory location via two different addresses will communicate...
View Article
More Pages to Explore .....