The usual pattern for a singleton class is something like
static Foo &getInst() { static Foo *inst = NULL; if(inst == NULL) inst = new Foo(...);
Use pthread_once, which is guaranteed that the initialization function is run once atomically.
(On Mac OS X it uses a spin lock. Don't know the implementation of other platforms.)