In the following piece of C code, the function is thread-safe, but not reentrant.
In the following piece of C code, neither functions f nor g are reentrant. A function can be thread-safe and still not reentrant.