If any thread-unsafe routines are called from multithreaded code, then each call must be serialized so that calls to the unsafe routines are not simultaneously active. You can use a serialization primitive such as a global lock for this purpose.In some systems, some of the C standard library routines are not thread-safe. If a routine is to be called in multithreaded code, then consult the documentation for that routine to find out whether it is thread-safe and what the routine's thread-safe usage requirements are.For Client-Library routines, the section “Client-Library restrictions for multithreaded programs” summarizes thread-safe usage.