Path: utzoo!attcan!uunet!iscuva!jimc From: jimc@iscuva.ISCS.COM (Jim Cathey) Newsgroups: comp.sys.mac.programmer Subject: Re: what the heck is "reentrant"? Message-ID: <1837@iscuva.ISCS.COM> Date: 5 Aug 88 23:21:12 GMT References: <730049@hpcilzb.HP.COM> <104700046@p.cs.uiuc.edu> Organization: ISC Systems Corporation, Spokane, WA Lines: 27 In article <104700046@p.cs.uiuc.edu> gillies@p.cs.uiuc.edu writes: >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. It is OK to generate and execute your own assembly-language instructions provided you create them on the stack (since each invocation of the subroutine gets its own stack frame). On a 68020 you still must flush the cache after you execute your routine or risk the wrath of the gods! >(2) Old Fortran linkage. One of the first proposed ways of... Here's another (and I might add the easiest) way: (3) Modifying global or static local variables (in C parlance). (Unless you use semaphore techniques on them.) +----------------+ ! II CCCCCC ! Jim Cathey ! II SSSSCC ! ISC Systems Corp. ! II CC ! TAF-C8; Spokane, WA 99220 ! IISSSS CC ! UUCP: uunet!iscuva!jimc ! II CCCCCC ! (509) 927-5757 +----------------+ "With excitement like this, who is needing enemas?"