1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
A computer program or routine is called `reentrant' if it can safely
recursively and concurrently be called from multiple processes. To be
reentrant, a function must modify no static data, must not return a pointer to
static data, must work only on the data provided to it by the caller, and must
not call non-reentrant functions (Source:
lurl(http://en.wikipedia.org/wiki/Reentrant)).
Currently, b()'s parsing member function tt(parse) may or may not be
reentrant, depending on whether or not the option link(--thread-safe)(OPTIONS)
is specified.
The source file generated by b() containing the parsing member function not
only contains this function, but also various tables (e.g., state transition
tables) defined in the anonymous namespace. When the option tt(--thread-safe)
is provided, these tables are tt(const) tables: their elements are not changed
by the parsing function and so the parsing function, as it only manipulates
its own local data, becomes reentrant.
|