📄 resume.c
字号:
/* resume.c - resume */
#include <conf.h>
#include <kernel.h>
#include <proc.h>
/*------------------------------------------------------------------------
* resume -- unsuspend a process, making it ready; return the priority
*------------------------------------------------------------------------
*/
SYSCALL resume(pid)
int pid;
{
STATWORD ps;
struct pentry *pptr; /* pointer to proc. tab. entry */
int prio; /* priority to return */
disable(ps);
if (isbadpid(pid) || (pptr= &proctab[pid])->pstate!=PRSUSP) {
restore(ps);
return(SYSERR);
}
prio = pptr->pprio;
ready(pid, RESCHYES);
restore(ps);
return(prio);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -