Quote Originally Posted by brewbuck View Post
I don't see why you won't just use "volatile." Without it, various other optimizations might be made that are inappropriate. You don't want the compiler to "waste" code by reloading variables, yet that's exactly what needs to happen when more than one execution thread can change the variable.
Seconded.

You're saying that you don't want the compiler to do exactly what you actually need it to do. Just declare it volatile.