| |
comp.os.minix |
In article <1991Aug26.110602.19...@klaava.Helsinki.FI> torva...@klaava.Helsinki.FI (Linus Benedict Torvalds) writes: /* An interesting way to write a device driver. I believe this is a very old Good luck on your OS project, it sounds like a lot of fun.
>handled without trying to hide the reason behind them (I especially like
>my hard-disk-driver. Anybody else make interrupts drive a state-
>machine?).
written this way. A comment from his code:
* This layer works based on small simple 'scripts' that are installed
* at the start of the command and drive the chip to completion.
* The idea comes from the specs of the NCR 53C700 'script' processor.
*
* There are various reasons for this, mainly
* - Performance: identify the common (successful) path, and follow it;
* at interrupt time no code is needed to find the current status
* - Code size: it should be easy to compact common operations
* - Adaptability: the code skeleton should adapt to different chips without
* terrible complications.
* - Error handling: and it is easy to modify the actions performed
* by the scripts to cope with strange but well identified sequences
*
*/
technique, too.
Jaime
...........................................................................
: domain: j...@cs.umd.edu James da Silva
: path: uunet!mimsy!jds Systems Design & Analysis Group