std.h and stdlib.h functions
2-512
Note: RTS Functions Callable from TSK Threads Only
Many runtime support (RTS) functions use lock and unlock functions to
prevent reentrancy. However, DSP/BIOS SWI and HWI threads cannot
call LCK_pend and LCK_post. As a result, RTS functions that call
LCK_pend or LCK_post
must not be called in the context of a SWI or
HWI thread
. For a list or RTS functions that should not be called from
a SWI or an HWI function, see “LCK_pend” on page 2-180.
To determine whether a particular RTS function uses LCK_pend, refer to
the source code for that function shipped with Code Composer Studio.
The following table shows some of the RTS functions that call LCK_pend
in certain versions of Code Composer Studio:
The C++ new operator calls malloc, which in turn calls LCK_pend. As a
result, the new operator cannot be used in the context of a SWI or HWI
thread.
fprintf
printf
vfprintf
sprintf
vprintf
vsprintf
clock
strftime
minit
malloc
realloc
free
calloc
rand
srand
getenv