Annotation of xinu/sys/recvclr.c, revision 1.1

1.1     ! root        1: /* recvclr.c - recvclr */
        !             2: 
        !             3: #include <conf.h>
        !             4: #include <kernel.h>
        !             5: #include <proc.h>
        !             6: 
        !             7: /*------------------------------------------------------------------------
        !             8:  *  recvclr  --  clear messages, returning waiting message (if any)
        !             9:  *------------------------------------------------------------------------
        !            10:  */
        !            11: SYSCALL        recvclr()
        !            12: {
        !            13:        PStype  ps;
        !            14:        int     msg;
        !            15: 
        !            16:        disable(ps);
        !            17:        if ( proctab[currpid].phasmsg ) {       /* existing message?    */
        !            18:                proctab[currpid].phasmsg = FALSE;
        !            19:                msg = proctab[currpid].pmsg;
        !            20:        } else
        !            21:                msg = OK;
        !            22:        restore(ps);
        !            23:        return(msg);
        !            24: }

unix.superglobalmegacorp.com

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