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

1.1     ! root        1: /* getprio.c - getprio */
        !             2: 
        !             3: #include <conf.h>
        !             4: #include <kernel.h>
        !             5: #include <proc.h>
        !             6: 
        !             7: /*------------------------------------------------------------------------
        !             8:  * getprio -- return the scheduling priority of a given process
        !             9:  *------------------------------------------------------------------------
        !            10:  */
        !            11: SYSCALL getprio(pid)
        !            12:        int     pid;
        !            13: {
        !            14:        struct  pentry  *pptr;
        !            15:        PStype  ps;
        !            16: 
        !            17:        disable(ps);
        !            18:        if (isbadpid(pid) || (pptr = &proctab[pid])->pstate == PRFREE) {
        !            19:                restore(ps);
        !            20:                return(SYSERR);
        !            21:        }
        !            22:        restore(ps);
        !            23:        return(pptr->pprio);
        !            24: }

unix.superglobalmegacorp.com

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