Datasheet

The C and C++ Libraries
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-5
The following points describe how static data is used by the libraries:
Floating-point arithmetic libraries do not use static data and are always reentrant.
All statically-initialized data in the C libraries is read-only.
All writable static data is uninitialized.
Most C library functions use no writable static data and are reentrant whether built
with base build options (
-apcs /norwpi
) or reentrant (
-apcs /rwpi
) build options.
A few functions have static data in their definitions (see Table 4-1). You must not
use these, or other similar functions, in a reentrant application unless you build it
-apcs /rwpi
.
Caution
The number of functions that use static data in their definitions might change in future
versions of ADS.
Table 4-1 Library functions that use static data
Function Description
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
stderr
These 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
functions These are used to install FP exception traps
signal.h
functions These are used to install signal handlers