home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / programm / 8938 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.6 KB

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