Race condition
A race condition or race hazard is the behavior of an electronics, software, or other system where the system's substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of the possible behaviors is undesirable.
Reentrancy (computing)
In the above, depends on a non-constant global variable ; thus, if two threads execute it and access concurrently, a race condition results. The value of and, therefore, the return value of , cannot be predicted with confidence: they will vary depending on the timing of the execution. Hence, is not reentrant. Neither is , because it calls , which is not reentrant.