home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12758 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.8 KB

  1. Path: sparky!uunet!sun-barr!ames!think.com!ephraim
  2. From: ephraim@think.com (Ephraim Vishniac)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Writing asynchronous SCSI driver.
  5. Date: 21 Jul 1992 15:02:12 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 38
  8. Distribution: comp.sys.mac.programmer
  9. Message-ID: <14h8tkINN61k@early-bird.think.com>
  10. References: <HEYES.92Jul21092205@dadev.cebaf.gov>
  11. NNTP-Posting-Host: charon.think.com
  12.  
  13. In article <HEYES.92Jul21092205@dadev.cebaf.gov> heyes@dadev.cebaf.gov (Graham Heyes) writes:
  14. >I am writing a Hard disk driver in think C....
  15. >On average I would expect
  16. >a 13mS delay from the drive while the heads move over the 
  17. >block that I'm looking for. What I am wondering is if I can 
  18. >use that 13mS to do some usefull work. That is where my 
  19. >knowledge of the Mac OS falls down. 
  20.  
  21. >I am assuming Multifinder
  22. >is giving me something like a multi-tasking environment with 
  23. >the possibility of forced context switching from one task to 
  24. >another.
  25.  
  26. It doesn't.
  27.  
  28. >1) How do I switch context in but still be able to recheck 
  29. >   the bus phase every 13mS?
  30.  
  31. You don't.
  32.  
  33. >2) How do I make a "task" which wants to use the driver pend 
  34. >   until the current transaction has completed?
  35.  
  36. You don't.
  37.  
  38. >    This is probably doccumented somewhere but a code 
  39. >example would be a great help.
  40.  
  41. The appropriate documentation firmly discourages developers from
  42. attempting to implement asynchronous device drivers. Even if you did,
  43. it's up to the application to request asynch I/O (see the Device
  44. Manager chapter of IM), which none of them do. 
  45.  
  46. -- 
  47. Ephraim Vishniac    ephraim@think.com   ThinkingCorp@applelink.apple.com
  48.  Thinking Machines Corporation / 245 First Street / Cambridge, MA 02142
  49.         One of the flaws in the anarchic bopper society was
  50.         the ease with which such crazed rumors could spread.
  51.