Path: utzoo!utgpu!attcan!uunet!husc6!uwvax!oddjob!uxc!uxc.cso.uiuc.edu!a.cs.uiuc.edu!p.cs.uiuc.edu!gillies From: gillies@p.cs.uiuc.edu Newsgroups: comp.sys.mac.programmer Subject: Re: what the heck is "reentrant"? Message-ID: <104700046@p.cs.uiuc.edu> Date: 3 Aug 88 23:44:00 GMT References: <730049@hpcilzb.HP.COM> Lines: 17 Nf-ID: #R:hpcilzb.HP.COM:730049:p.cs.uiuc.edu:104700046:000:808 Nf-From: p.cs.uiuc.edu!gillies Aug 3 18:44:00 1988 Here are a few common ways to make something NON-reentrant: (1) Have a subroutine generate and execute its own assembly-language instructions. Two separate threads of execution might try to write different instructions to the same place. (2) Old Fortran linkage. One of the first proposed ways of implementing a subroutines was to "deposit & jump", e.g. deposit the return location in a global (right before the subroutine instructions), and then jump to the beginning of the subroutine. if two different threads of execution call the same subroutine at the same time, then one will probably return to the wrong location. Don Gillies, Dept. of Computer Science, University of Illinois 1304 W. Springfield, Urbana, Ill 61801 ARPA: gillies@cs.uiuc.edu UUCP: {uunet,ihnp4,harvard}!uiucdcs!gillies