Consider the following scenario. We have a C++ function with a static local variable:
void function()
{
static int variable = obtain();
//blahblablah
C++ says that your static variable should only be initialized once - however C++ doesn't deal with threads(yet).
gcc(atleast on *nix systems) does the proper magic to safely guard multiple threads initializing such a static variable. According to http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/12f8e2c7-d94d-4904-8c79-a0b0d1088e0b , msvc does not - and in such a case you'll have to lock the initialization yourself.
Guarding the initialization with a critical section should protect all this - i.e. your functionThreadSafe() is ok - (unless obtain() itself calls functionThreadSafe()
http://blogs.msdn.com/b/oldnewthing/archive/2004/03/08/85901.aspx is worth a read in this regard.
Personally, to avoid surprises I'd try to rewrite this so you can initialize variable yourself, once, before you create any threads - e.g.
static int variable = 0;
void init_variable() //call this once, at the start of main()
{
variable = obtain();
}
void function()
{
//use variable, lock if you write to it
}