Цитата
это вероятные догадки... хотелось бы документального подтверждения
На странице 390 мануала все написано, что эти функции не реентерабельны. Защищайте их сами семафорами или мутексами ну или свой менагер.
Цитата
REENTRANCY
A function that can be simultaneously invoked in the main application and in any
number of interrupts is reentrant. A library function that uses statically allocated data is
therefore not reentrant.
Most parts of the DLIB library are reentrant, but the following functions and parts are
not reentrant because they need static data:
● Heap functions—malloc, free, realloc, calloc, and the C++ operators new
and delete
● Locale functions—localeconv, setlocale
● Multibyte functions—mbrlen, mbrtowc, mbsrtowc, mbtowc, wcrtomb,
wcsrtomb, wctomb
● Rand functions—rand, srand
● Time functions—asctime, localtime, gmtime, mktime
● The miscellaneous functions atexit, strerror, strtok
● Functions that use files or the heap in some way. This includes printf, sprintf,
scanf, sscanf, getchar, and putchar.
Functions that can set errno are not reentrant, because an errno value resulting from
one of these functions can be destroyed by a subsequent use of the function before it is
read. This applies to math and string conversion functions, among others.
Remedies for this are:
● Do not use non-reentrant functions in interrupt service routines