Annotation of xinu/sys/LSI/dsread.c, revision 1.1

1.1     ! root        1: /* dsread.c - dsread */
        !             2: 
        !             3: #include <conf.h>
        !             4: #include <kernel.h>
        !             5: #include <proc.h>
        !             6: #include <disk.h>
        !             7: 
        !             8: /*------------------------------------------------------------------------
        !             9:  *  dsread  --  read a block from a disk device
        !            10:  *------------------------------------------------------------------------
        !            11:  */
        !            12: dsread(devptr, buff, block)
        !            13:        struct  devsw   *devptr;
        !            14:        char    *buff;
        !            15:        DBADDR  block;
        !            16: {
        !            17:        struct  dreq    *drptr;
        !            18:        int     stat;
        !            19:        char    ps;
        !            20: 
        !            21:        disable(ps);
        !            22:        drptr = (struct dreq *) getbuf(dskrbp);
        !            23:        drptr->drdba = block;
        !            24:        drptr->drpid = currpid;
        !            25:        drptr->drbuff = buff;
        !            26:        drptr->drop = DREAD;
        !            27:        if ( (stat=dskenq(drptr, devptr->dvioblk)) == DONQ) {
        !            28:                suspend(currpid);
        !            29:                stat = drptr->drstat;
        !            30:        }
        !            31:        freebuf(drptr);
        !            32:        restore(ps);
        !            33:        return(stat);
        !            34: }

unix.superglobalmegacorp.com

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