Good advice for all C programmers out there.

  • It is not a good idea to use <pre>volatile</pre> for creating multi-threaded applications like the author is explaining it will just end up creating more problems than solving one. Better use a library.

    The problem with volatile is that if mark everything volatile you program is just going to run a lot slower. If you don't make all of them volatile it is still possible the hardware could reorder references even if the compiler doesn't.