Annotation of xinu/h/ports.h, revision 1.1

1.1     ! root        1: /* ports.h - isbadport */
        !             2: 
        !             3: #define        NPORTS          50              /* maximum number of ports      */
        !             4: #define        MAXMSGS         100             /* maximum messages on all ports*/
        !             5: #define        PTFREE          '\01'           /* port is Free                 */
        !             6: #define        PTLIMBO         '\02'           /* port is being deleted/reset  */
        !             7: #define        PTALLOC         '\03'           /* port is allocated            */
        !             8: #define        PTEMPTY         -1              /* initial semaphore entries    */
        !             9: 
        !            10: struct ptnode  {                       /* node on list of message ptrs */
        !            11:        int     ptmsg;                  /* a message                    */
        !            12:        struct  ptnode  *ptnext;        /* address of next node on list */
        !            13: };
        !            14: 
        !            15: struct pt      {                       /* entry in the port table      */
        !            16:        char    ptstate;                /* port state (FREE/LIMBO/ALLOC)*/
        !            17:        int     ptssem;                 /* sender semaphore             */
        !            18:        int     ptrsem;                 /* receiver semaphore           */
        !            19:        int     ptmaxcnt;               /* max messages to be queued    */
        !            20:        int     ptseq;                  /* sequence changed at creation */
        !            21:        struct  ptnode  *pthead;        /* list of message pointers     */
        !            22:        struct  ptnode  *pttail;        /* tail of message list         */
        !            23: };
        !            24: 
        !            25: extern struct  ptnode  *ptfree;        /* list of free nodes           */
        !            26: extern struct  pt      ports[];        /* port table                   */
        !            27: extern int     ptnextp;                /* next port to examine when    */
        !            28:                                        /*   looking for a free one     */
        !            29: #ifdef MEMMARK
        !            30: extern MARKER  ptmark;
        !            31: #endif
        !            32: 
        !            33: #define        isbadport(portid)       ( (portid)<0 || (portid)>=NPORTS )

unix.superglobalmegacorp.com

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