Annotation of xinu/sys/newqueue.c, revision 1.1.1.2

1.1       root        1: /* newqueue.c  -  newqueue */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <q.h>
                      6: 
                      7: /*------------------------------------------------------------------------
                      8:  * newqueue  --  initialize a new list in the q structure
                      9:  *------------------------------------------------------------------------
                     10:  */
1.1.1.2 ! root       11: int    newqueue(hindex,tindex)
        !            12:        int     *hindex,*tindex;        /* addresses of integers to     */
        !            13:                                        /* contain head, tail indexes   */
1.1       root       14: {
1.1.1.2 ! root       15:        struct  qent    *hptr;
        !            16:        struct  qent    *tptr;
1.1       root       17: 
1.1.1.2 ! root       18:        hptr = &q[(*hindex)=nextqueue++]; /* assign and rememeber queue */
        !            19:        tptr = &q[(*tindex)=nextqueue++]; /* index values for head&tail */
        !            20:        hptr->qnext = *tindex;
1.1       root       21:        hptr->qprev = EMPTY;
                     22:        tptr->qnext = EMPTY;
1.1.1.2 ! root       23:        hptr->qkey  = MININT;
        !            24:        tptr->qkey  = MAXINT;
        !            25:        tptr->qprev = *hindex;
1.1       root       26: }

unix.superglobalmegacorp.com

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