home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!mips!darwin.sura.net!uvaarpa!murdoch!murdoch.acc.virginia.edu!heyes
- From: heyes@dadev.cebaf.gov (Graham Heyes)
- Newsgroups: comp.sys.mac.programmer
- Subject: Writing asynchronous SCSI driver.
- Message-ID: <HEYES.92Jul21092205@dadev.cebaf.gov>
- Date: 21 Jul 92 14:22:05 GMT
- Sender: usenet@murdoch.acc.Virginia.EDU
- Distribution: comp.sys.mac.programmer
- Organization: Continuous Electron Beam Accelerator Facility
- Lines: 26
-
- I am writing a Hard disk driver in think C. It all seems to
- work and is certainly faster than Apples own driver. Rather
- than using the SCSI manager I have leapt in with manuals on
- the Mac hardware and access the ncr5380 SCSI controller
- directly. Looking at my code I have a main loop where I wait
- for phase changes on the SCSI bus. 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.
-
- 1) How do I switch context in but still be able to recheck
- the bus phase every 13mS?
-
- 2) How do I make a "task" which wants to use the driver pend
- until the current transaction has completed?
-
-
- This is probably doccumented somewhere but a code
- example would be a great help.
- Thanks
- Graham Heyes
-
-