Originally Posted by Codeplug volatile has nothing to do with multi-threading or its correctness. Even over multiple cores in the presence of memory barriers? How will the compiler/CPU know not to cache/optimize access to a particular variable, when that variable could be changing underneath them?