what the heck is "reentrant"?

Doug Gwyn gwyn at brl-smoke.ARPA
Sat Jul 30 07:58:40 AEST 1988


In article <650002 at hpcilzb.HP.COM> tedj at hpcilzb.HP.COM (Ted Johnson) writes:
>What the heck is the definition of "reentrant" vs. "non-reentrant",
>for subroutines and programs?

A reentrant routine can be interrupted in the midst of operation,
reinitiated on behalf of the interrupt-processing thread of
execution, then resumed at the point of interruption with neither
invocation broken by the other.  A non-reentrant routine can't.

There is also the concept of "serially reusable" which means that
the routine can be executed from start to finish more than once
with no coupling between the invocations.  Most C functions are
written to be serially reusable; they don't modify data having
static storage duration.



More information about the Comp.lang.c mailing list