home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!spool.mu.edu!sgiblab!newsun!mlavine
- From: mlavine@novell.com (Marc Lavine)
- Subject: Re: reentrant code
- Message-ID: <1992Dec12.110549.27153@novell.com>
- Sender: news@novell.com (The Netnews Manager)
- Nntp-Posting-Host: la.sjf.novell.com
- Organization: Novell, Inc.
- References: <GARY.92Dec9104702@kuwait.gdfwc3> <1992Dec10.045716.12505@linus.mitre.org>
- Date: Sat, 12 Dec 1992 11:05:49 GMT
- Lines: 25
-
- crawford@boole.mitre.org (Randy Crawford) writes:
-
- >But reentrant code is meant to remain
- >in memory after a context switch, allowing another task to reuse the memory
- >and save the cost of swapping it out and then back in immediately.
-
- I believe that you may be confusing reentrancy with shared code.
- Reentrancy has nothing to do with swapping memory or tasks around.
- You may also be confusing context switching and swapping. Context
- switching does not generally have to do with swapping anything other
- than values in registers.
-
- Here's how I'd describe reentrant code:
-
- A section of code is reentrant if it will function properly when it is
- entered by a thread and then entered again without the thread that
- previously entered the code having exited the code yet.
-
- This has nothing to do with the O/S moving memory around.
- --
- Marc Lavine
- mlavine@Novell.Com
- --
- Marc Lavine
- mlavine@Novell.Com
-