|
|
1.1 ! root 1: /* sluint.c - sluint */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <tty.h> ! 6: #include <io.h> ! 7: ! 8: /* set up macros for appropriate SLU as spec. by SLUCHIP: ! 9: if SLUCHIP==6850, #include slu6850.h, #define SLUINT sluint6850, etc. ! 10: if SLUCHIP==7201, #include slu7201.h, #define SLUINT sluint7201, etc. ! 11: if SLUCHIP undef.,#include slu.h, #define SLUINT sluint (orig. case) ! 12: similarly sluaccess.h, other TTY fns */ ! 13: #include <sluinclude.h> ! 14: ! 15: /*------------------------------------------------------------------------ ! 16: * sluint -- interrupt dispatcher ! 17: * Xinu assumes separate int vecs for receiver and transmitter, ! 18: * but MC6850/NEC7201 has only one common one, so need this. ! 19: *------------------------------------------------------------------------ ! 20: */ ! 21: INTPROC SLUINT(descrp) ! 22: int descrp; ! 23: { ! 24: register struct tty *ttyp; ! 25: register struct csr *cptr; ! 26: ! 27: #ifdef DEBUG ! 28: dotrace ("sluint",NULL,0); ! 29: #endif ! 30: ttyp = (struct tty *) devtab[descrp].dvioblk ; ! 31: cptr = (struct csr *) ttyp->ioaddr ; ! 32: if (slurecvready(cptr)) { ! 33: TTYIIN(ttyp, cptr, FALSE); ! 34: return(OK); ! 35: } ! 36: if (slutransready(cptr)) { ! 37: TTYOIN(ttyp, cptr); ! 38: return(OK); ! 39: } ! 40: /* should not get here */ ! 41: panic("SLU interrupt but device not ready"); ! 42: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.