File:  [XINU] / xinu / sys / LSI / dsinter.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:04 2018 UTC (8 years, 2 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19870308, HEAD
Xinu for VAX

/* dsinter.c - dsinter */

#include <conf.h>
#include <kernel.h>
#include <disk.h>

/*------------------------------------------------------------------------
 *  dsinter  --  process disk interrupt (DTC interface; XEBEC controller)
 *------------------------------------------------------------------------
 */
INTPROC	dsinter(dsptr)
	struct	dsblk	*dsptr;
{
	struct	dtc	*dtptr;
	struct	dreq	*drptr;

	dtptr = dsptr->dcsr;
	drptr = dsptr->dreqlst;
	if (drptr == DRNULL) {
		panic("Disk interrupt when disk not busy");
		return;
	}
	if (dtptr->dt_csr & DTERROR)
		drptr->drstat = SYSERR;
	else
		drptr->drstat = OK;
	if ( (dsptr->dreqlst=drptr->drnext) != DRNULL)
		dskstrt(dsptr);
	switch (drptr->drop) {

		case DREAD:
		case DSYNC:
			ready(drptr->drpid, RESCHYES);
			return;

		case DWRITE:
			freebuf(drptr->drbuff);
			/* fall through */
		case DSEEK:
			freebuf(drptr);
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.