Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago.
Is vsnprintf re-entrant or thread safe?
Is the mbed library function vsnprintf re-entrant or thread safe?
I want to call functions that use vsnprintf from both the main code and a Ticker.
I've looked in the Keil compiler documentation, but cannot find an answer.
1 Answer
10 years ago.
Hi,
this link should answer your question http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.kui0099a/armlib_chdfgjej.htm
When using these functions, the string-based functions read the locale settings. Typically, they are thread-safe. However, if you change locale in mid-session, you must ensure that these functions are not affected. The string-based functions, such as sprintf() and sscanf(), do not depend on the stdio library.
Regards,
0xc0170