|
|
1.1 root 1: /* dsinter.c - dsinter */
2:
3: #include <conf.h>
4: #include <kernel.h>
5: #include <disk.h>
6:
7: /*------------------------------------------------------------------------
8: * dsinter -- process disk interrupt (DTC interface; XEBEC controller)
9: *------------------------------------------------------------------------
10: */
11: INTPROC dsinter(dsptr)
12: struct dsblk *dsptr;
13: {
14: struct dtc *dtptr;
15: struct dreq *drptr;
16:
17: dtptr = dsptr->dcsr;
18: drptr = dsptr->dreqlst;
19: if (drptr == DRNULL) {
20: panic("Disk interrupt when disk not busy");
21: return;
22: }
23: if (dtptr->dt_csr & DTERROR)
24: drptr->drstat = SYSERR;
25: else
26: drptr->drstat = OK;
27: if ( (dsptr->dreqlst=drptr->drnext) != DRNULL)
28: dskstrt(dsptr);
29: switch (drptr->drop) {
30:
31: case DREAD:
32: case DSYNC:
33: ready(drptr->drpid, RESCHYES);
34: return;
35:
36: case DWRITE:
37: freebuf(drptr->drbuff);
38: /* fall through */
39: case DSEEK:
40: freebuf(drptr);
41: }
42: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.