Thread Safety
Functions that can be called from multiple threads without destructive results are said to be thread safe.
The use of global variables (extern or static) or static local variables makes a function thread-unsafe.
Beware of some functions in the standard library (e.g., strtok).