Quantcast
Channel: Is volatile a proper way to make a single byte atomic in C/C++? - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Thomas Matthews for Is volatile a proper way to make a single byte atomic in C/C++?

$
0
0

The volatile keyword is used to indicate that a variable (int, char, or otherwise) may be given a value from an external, unpredictable source. This usually deters the compiler from optimizing out the variable.

For atomic you will need to check your compiler's documentation to see if it provides any assistance or declaratives, or pragmas.


Viewing all articles
Browse latest Browse all 6

Trending Articles



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