3 ms·
In a discussion like this you have to mention that Microsoft’s compiler extended volatile to mean atomic[1], although its default behavior depends on target ISA
by david2ndaccount 3y ago
In a discussion like this you have to mention that Microsoft’s compiler extended volatile to mean atomic[1], although its default behavior depends on target ISA apparently. Regardless, just use c11/c++11 atomics at this point.
1. https://learn.microsoft.com/en-us/cpp/cpp/volatile-cpp?view=msvc-170 https://learn.microsoft.com/en-us/cpp/cpp/volatile-cpp?view=...
- gpderetta 3y agoYes but they consider the additional semantics a mistake: "we strongly recommend that you specify /volatile:iso, and use explicit synchronization primitives and compiler intrinsics when you are dealing with memory that is shared across threads." /volatile:iso is the default for ARM as the extended semantics would be extremely penalising.