re-entrant


Also found in: Dictionary, Thesaurus, Wikipedia.

re-entrant

(programming)
Used to describe code which can have multiple simultaneous, interleaved, or nested invocations which will not interfere with each other. This is important for parallel processing, recursive functions or subroutines, and interrupt handling.

It is usually easy to arrange for multiple invocations (e.g. calls to a subroutine) to share one copy of the code and any read-only data but, for the code to be re-entrant, each invocation must use its own copy of any modifiable data (or synchronised access to shared data). This is most often achieved using a stack and allocating local variables in a new stack frame for each invocation. Alternatively, the caller may pass in a pointer to a block of memory which that invocation can use (usually for outputting the result) or the code may allocate some memory on a heap, especially if the data must survive after the routine returns.

Re-entrant code is often found in system software, such as operating systems and teleprocessing monitors. It is also a crucial component of multithreaded programs where the term "thread-safe" is often used instead of "re-entrant".
References in periodicals archive ?
Model T with re-entrant corners is more vulnerable to earthquake damage, when compared to all other models.
The flow rates in the reservoir and the slit both increase as the piston speed increases and then decay shortly after the re-entrant area.
Moreover, the results of simulations based on the optimised transport models seem to qualitatively follow the trends of the re-entrant jet formation at the trailing edge of the sheet.
For the re-entrant inlet, it started and ended at a Reynolds number of 2000 and 6700, respectively, near the inlet of the tube (3 diameters from the inlet), and 2100 and 8500 near the exit (192 diameters from the inlet).
The Physiotherapy Registration Board is less likely to be the initial contact point for a re-entrant as they have maintained their registration.
The re-entrant chamber without central projection and with sharp edges provides higher swirl number than all other chambers.
Re-entrant circuits require two pathways capable of conduction with unilateral conduction delay in one limb and an intervening conduction barrier (Figure 1).
It also may require the underlying machine vision libraries to be written in a re-entrant manner that allows multiple instances of the program to execute in parallel.
As a consequence, the twinning is clearly shown by re-entrant angles formed by equivalent faces of the two crystals where they meet.
That is unlikely, however, and numerous features point to a date in the late 8th or the course of the 9th century: the proportions of the new outermost ogival-shaped axial step (a Khmer, not a Dvaravati feature); the presence of pairs of flee-standing lions (which first appear in Cambodian art at Sambor C1, probably of the late 8th century); recovered stuccos, including heads of teeth-baring guardians, somewhat reminiscent of those in Cham temples of the late 8th century; and extensions at the corners that with their multiple re-entrant angles evoke the flavour of 8th-9th-century octagonal-based stupas at the site of U Thong, north of Nakhon Pathom.