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

1.1       root        1: /* resume.c - resume */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <proc.h>
                      6: 
                      7: /*------------------------------------------------------------------------
                      8:  * resume  --  unsuspend a process, making it ready; return the priority
                      9:  *------------------------------------------------------------------------
                     10:  */
                     11: SYSCALL resume(pid)
                     12:        int     pid;
                     13: {
                     14:        struct  pentry  *pptr;          /* pointer to proc. tab. entry  */
                     15:        int     prio;                   /* priority to return           */
                     16: 
1.1.1.2 ! root       17:        disable();
        !            18:        if (isbadpid(pid) || (pptr= &proctab[pid])->pstate!=PRSUSP) {
        !            19:                restore();
1.1       root       20:                return(SYSERR);
                     21:        }
                     22:        prio = pptr->pprio;
                     23:        ready(pid, RESCHYES);
1.1.1.2 ! root       24:        restore();
1.1       root       25:        return(prio);
                     26: }

unix.superglobalmegacorp.com

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