...
According to the C11 Standard, the following library functions are not required to avoid may contain data races when invoked by multiple threads:
API | Recommendation |
---|---|
rand() , srand() | MSC30-C. Do not use the rand() function for generating pseudorandom numbers |
getenv() , getenv_s() | ENV00-C. Do not store the pointer to the string returned by getenv() |
strtok() | strtok_s() in C11 Annex K, or strtok_r() in POSIX |
strerror() | strerror_s() in C11 Annex K, or strerror_r() in POSIX |
asctime() , ctime() ,localtime() , gmtime() | asctime_s() , ctime_s() , localtime_s() , gmtime_s() in C11 Annex K |
setlocale() | Protect multithreaded access to locale-specific APIs with a mutex |
ATOMIC_VAR_INIT , atomic_init() | Do not attempt to initialize an atomic variable from multiple threads |
tmpnam() | tmpnam_s() in C11 Annex K, tmpnam_r() in POSIX |
mbrtoc16() , c16rtomb() ,mbrtoc32() , c32rtomb() | Do not call with a null mbstate_t * argument |
...