Just to be my usual self. In general in CS, "reentrant" does not mean
"non-self modifying". Many programs which do not modify themselves are
still not reentrant due to uncoordinated updating of shared resources.
Likewise, if done properly a self modifying program can still be
reentrant.

ref: http://en.wikipedia.org/wiki/Reentrant_%28subroutine%29
<quote>
In computing, a computer program or subroutine is called reentrant if it
can be interrupted in the middle of its execution and then safely called
again before its previous invocations complete executing.
</quote>

simple non-reentrant code example:

L R1,SOMEVALUE
AHI R1,+1
ST R1,SOMEVALUE

Note that it is possible for the program to be interrupted after the L
and before the ST and some other function (or another task running this
function) to update SOMEVALUE. So SOMEVALUE can become corrupted (update
lost).

IIRC, non-self modifying code is called "pure code" in UNIX.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to