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

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: {
1.1.1.2 ! root       13:        WORD    msg;
1.1       root       14: 
1.1.1.2 ! root       15:        disable();
        !            16:        if (proctab[currpid].phasmsg) {
        !            17:                proctab[currpid].phasmsg = 0;
1.1       root       18:                msg = proctab[currpid].pmsg;
                     19:        } else
                     20:                msg = OK;
1.1.1.2 ! root       21:        restore();
1.1       root       22:        return(msg);
                     23: }

unix.superglobalmegacorp.com

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