2 ms·
> In a language like C, you can declare a variable to be volatile. When the program is compiled, this causes the compiler to emit memory barrier instructions N
by vardump 8y ago
> In a language like C, you can declare a variable to be volatile. When the program is compiled, this causes the compiler to emit memory barrier instructions
Not true (except maybe on MSVC). This unfortunately very common misbelief has lead to so many concurrency bugs on weakly ordered CPU architectures.