It's not legal C code, since C requires initializers of static variables to be compile-time constants. Hence the initialization can happen at program load time, before any threads have a chance to be started, so there can be no race conditions there.
From C99 §6.7.8/4:
All the expressions in an initializer for an object that has static storage duration shall be constant expressions or string literals.
Visual Studio may allow non-constants as a non-standard extension, but for that, all bets are off. Check its documentation and/or its generated assembly code to see if it's thread-safe or not.
For C++, where non-constants initializers are allowed, see the question Is initialization of local static function-object thread-safe?. Short answer: Yes, in C++11, no in C++03 and earlier (which don't mention threads in the standard), though compilers may still make it thread-safe if they choose.