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