When to use volatile
- an object that is a memory-mapped I/O port
- an object that is shared between multiple concurrent processes
- an object that is modified by an asynchronous signal handler
- an automatic storage duration object declared in a function that calls setjmp and whose value is changed between the call to setjmp and a corresponding call to longjmp
For details refer :http://www.programmersheaven.com/articles/pathak/article1.htm
Comments