On Thu, 1 Aug 2013 17:50:10 -0400, John Gilmore wrote: >What seems to have fallen through the cracks in this [tangential] >discussion is that the use of code-modification schemes, ALTER and the >like, in a routine makes it non-reentrant. > >This in my view is the crucial objection to their use. > One might imagine restoring reentrancy by making the alterable fragments pointers into obtained storage.
Almost as bad as code-modification is the use in C of function pointers in structs. BTDT. In PostScript, subroutines are first-class data objects. Something similar applies to Lisp. Sometimes the interpreter helps with the debugging. And there was a version of the PDP-8 with the OS in ROM with all modifiable locations replaced with pointers to locations in RAM. PSA makes z/OS partly reentrant. Exploited by multiple CPUs in any LPAR, but not, AFAIK, by VM or PR/SM. CMS has a reentrant kernel (nucleus?), precious for virtualization. I believe Linux has not. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
