When to use volatile

  1. an object that is a memory-mapped I/O port

  2. an object that is shared between multiple concurrent processes

  3. an object that is modified by an asynchronous signal handler

  4. 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

Popular posts from this blog

Airtel Digital tv remote factory reset and reprogram

Tracking Linux kworker threads

Asynchronus I/O (AIO) in vxworks and Linux