I have currently created a C++ class for a thread safe integer which simply stores an integer privately and has public get a set functions which use a boost::mutex to ensure tha
There is the C++0x atomic library, and there is also a Boost.Atomic library under development that use lock free techniques.