Annotation of xinu/sys/vcuoin.c, revision 1.1.1.1

1.1       root        1: /* vcuoin.c - vcuoin */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <tty.h>
                      6: #include <io.h>
                      7: #include <vcu.h>
                      8: #include <procreg.h>
                      9: 
                     10: /*------------------------------------------------------------------------
                     11:  *  vcuoin  --  lower-half vcu device driver for output interrupts
                     12:  *------------------------------------------------------------------------
                     13:  */
                     14: INTPROC        vcuoin(iptr)
                     15:        register        struct  tty     *iptr;
                     16: {
                     17:        register        int     ct;
                     18: 
                     19:        if (iptr->ehead != iptr->etail) {
                     20:                mtpr(iptr->ebuff[iptr->etail++]&VCUOCHMASK, TXDB);
                     21:                if (iptr->etail >= EBUFLEN)
                     22:                        iptr->etail = 0;
                     23:                return;
                     24:        }
                     25:        if (iptr->oheld) {                      /* honor flow control   */
                     26:                mtpr(VCUTXCSDSBL, TXCS);
                     27:                return;
                     28:        }
                     29:        if ((ct=scount(iptr->osem)) < OBUFLEN) {
                     30:                mtpr(iptr->obuff[iptr->otail++]&VCUOCHMASK, TXDB);
                     31:                if (iptr->otail >= OBUFLEN)
                     32:                        iptr->otail = 0;
                     33:                if (ct > OBMINSP)
                     34:                        signal(iptr->osem);
                     35:                else if ( ++(iptr->odsend) == OBMINSP) {
                     36:                        iptr->odsend = 0;
                     37:                        signaln(iptr->osem, OBMINSP);
                     38:                }
                     39:        } else
                     40:                mtpr(VCUTXCSDSBL, TXCS);
                     41: }

unix.superglobalmegacorp.com

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