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