--- xinu/sys/getprio.c 2018/04/24 17:39:04 1.1.1.1 +++ xinu/sys/getprio.c 2018/04/24 17:39:54 1.1.1.2 @@ -1,24 +1,22 @@ -/* getprio.c - getprio */ -#include +/* getprio.c */ + +#include #include #include -/*------------------------------------------------------------------------ - * getprio -- return the scheduling priority of a given process - *------------------------------------------------------------------------ - */ SYSCALL getprio(pid) - int pid; +int pid; { - struct pentry *pptr; - PStype ps; - - disable(ps); - if (isbadpid(pid) || (pptr = &proctab[pid])->pstate == PRFREE) { - restore(ps); - return(SYSERR); - } - restore(ps); - return(pptr->pprio); + struct pentry *pptr; + + disable(); + if (isbadpid(pid) || (pptr = &proctab[pid])->pstate == PRFREE) + { + restore(); + return(SYSERR); + } + restore(); + return(pptr->pprio); } +