Tuesday, February 26, 2013

Volatile Variable

Generally speaking, the volatile keyword is intended to prevent the compiler from applying any optimizations on the code that assume values of variables cannot change "on their own."

--Wikipedia


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.

How to USE c volatile Keywords:

http://www.barrgroup.com/Embedded-Systems/How-To/C-Volatile-Keyword

No comments:

Post a Comment