4.1.3. Reentrancy and static data

Libraries that make use of static data are supplied in two variants:

The following points describe how static data is used by the libraries:

Table 4.1. Library functions that use static data

strtok()Contains implicit static data
gamma() and lgamma()These functions, in math.h, use a global variable called signgam
rand() and srand()Require a random seed
stdin, stdout, and stderrThese are static data
atexit()Stores exit handlers in static data
setlocale(), asctime(), localtime(), localeconv(), and tmpnam()Return pointers to static data
__user_libspace()This function is used by many other routines
_sys_clock()The default implementation has a static variable that stores the time-at-start-of-program
fenv.h functionsThese are used to install FP exception traps
signal.h functionsThese are used to install signal handlers


The number of functions that use static data in their definitions might change in future versions of ADS.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D