Thread safety for C code.