home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.msdos.programmer:8938 comp.os.msdos.misc:4982
- Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc
- Path: sparky!uunet!cs.utexas.edu!usc!rpi!utcsri!torn!cunews!bws-pc.carleton.ca!bws
- From: bws@ccs.carleton.ca (Brian Sullivan)
- Subject: Re: Why ms-dos is non reentrant
- Message-ID: <bws.35@ccs.carleton.ca>
- Sender: news@cunews.carleton.ca (News Administrator)
- Organization: Carleton University
- References: <92245.122042A10742@TRMETU.BITNET>
- Date: Tue, 1 Sep 1992 13:23:23 GMT
- Lines: 23
-
- In article <92245.122042A10742@TRMETU.BITNET> A10742@TRMETU.BITNET (Pinar Aydemir) writes:
-
- >I almost hear everyday that msdos is non-reentrant.
- >It is non re-entrant so dont call a dos funcion from a Interrupt Service
- >Routine.
- >Since It is non reentrant, bla bla bla.
-
- >I looked at some books about OS, and the definition of reentrancy is
- >given as being unmodified (pure) code.So, what makes msdos non reentrant ?
- >Any information is appreciated.
- >-Yasemin
-
- When performing a DOS call, some routines use Static data space, (rather than
- allocating memory on a stack). If you interrupt a DOS call to perform the
- same function(or on fro the same family, (even if you save all the
- registers) you can still trash the original data. And after your TSR exits
- DOS continues with corrupted data.
-
- Reentrancy is not dependent on pure code, it simply requires that a
- routine may call itself, or be interupted and called by another routine
- WITHOUT SIDE EFFECTS. To wit (I always wanted to say that) each time
- the code begins, all data must be allocated on a stack (no static data
- blocks!!!!!).
-