What is the volatile keyword in C?
C's volatile keyword is a qualifier that is applied to a variable when it is declared. It tells the compiler that the value of the variable may change at any time--without any action being taken by the code the compiler finds nearby. The implications of this are quite serious. However, before we examine them, let's take a look at the syntax.
In this video, Barr Group Principal Engineer Dan Smith offers important tips for how to best use the volatile keyword in Embedded C.
For more informative Tech Talks, go to Barr Group - Tech Talks.