Gast
#3131800
Hallo, aus der Dokumentation der ARM C Libraries geht nicht eindeutig hervor, ob sprintf thread-safe ist oder nicht: spintf, sscanf, ... : 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. Implementierung in meinem Projekt: - Cortex M3, STM32F105.. - Call von sprintf in main - Call von sprintf in ISR USART3 - dadurch massive Probleme (M)ein Lösungsansatz: - zwei memory regions - main ist region-1 zugeordnet - ISR ist region-2 zugeordnet - jetzt keine Probleme - Warum ist bei mir sprintf NICHT thread-safe? - Wann genau ist sprintf 'ATYPICAL' thread-UNSAFE? Gruß Claus