that some compilers can actually optimize inline assembler, leaving no truly portable way to do this in language. This issue has come up on comp.programming.threads in the past, but I don't remember whether there was any resolution insofar as C++ is concerned. Sean