questions about static function & static const variable

This is a discussion on questions about static function & static const variable within the C Programming forums, part of the General Programming Boards category; I have some questions (actually two) that really bugging me for a long time.
question #1:
why are some functions ...

Such functions cannot be seen outside of their translation unit (which essentially means source file). If you're not sharing a function with other .c files, then you should mark it as static so it's local only to that file. The same goes for global variables you don't want to share.

is this function thread safe?

Probably not, depending on what you actually do with the static data. It might be, if you carefully lock access to it, but it's better to try to avoid using static there.

The keyword "static" is overloaded in C. At file scope (that is, globally), it means "hide this from other source files". Inside of a function, it means "this variable retains its value between calls" (that is, it essentially becomes global but accessible only in that particular block).

To make life even more fun, C99 added a new meaning for static, but it's not really all that useful to know about it.

I disagree with cas on question 2. The variable is constant. It will never change and always be initialized.

That is thread safe. But the convention for constants is to be in ALL_CAPS format so that they stand out.

I agree with King Mir, even though the source code example doesn't even show any interaction with the static const.
As it is, it is undeniably thread safe, and the question was implied to be about the exact code posted, rather than about a function which does something like what he posted. The static const might even be optimised out in this case, if it isn't used.
However, it is returning an uninitialised variable which kinda makes it pointless. In other words, as the question about the real code, not an unrepresentative mock example.

That is thread safe. But the convention for constants is to be in ALL_CAPS format so that they stand out.

It is normally only macros that should be all caps. Constants may be marked in a special way to indicate that they are constants.

Also, to clarify the points made:
a static const variable should never be changed by the compiler, so it should be safe to use in a multithreaded environment.

On the other hand, if you have a static variable that is NOT const, it's a BIG warning sign for multithreaded code - a static local variable is essentially a global variable which can't be seen outside of the current function. So if two threads are using the function at the same time, they would potentially modify the very same variable. One particular "trick" where static variable is often used is where a C style string is returned, and a static char array is used to store the string - this will NOT be thread-safe, as another call to the same function will modify the string returned by another call.