📄 prcutil3.c
字号:
/* *---------------------------------------------------------------------- * T-Kernel / Standard Extension * * Copyright (C) 2006 by Ken Sakamura. All rights reserved. * T-Kernel / Standard Extension is distributed * under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * * Version: 1.00.00 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* * prcutil3.c (proc) * * Kernel utility * Process management related */#include "call.h"#include <sys/util.h>#include <sys/pinfo.h>/* * Obtain process management information based on process ID */EXPORT ER GetPidToPinfo( W pid, PINFO **pinfo ){ return CallKernelFunc(__CommArea->GetPidToPinfo, pid, pinfo);}/* * Obtain process management information based on process ID * LockPinfo() is executed under normal conditions; not locked when error occurs. */EXPORT ER PidToPinfo( W pid, PINFO **pinfo ){ ER err; LockPinfo(); err = GetPidToPinfo(pid, pinfo); if ( err < E_OK ) { UnlockPinfo(); } return err;}/* * Obtain process-related information */EXPORT VP GetMinfo( ID taskid, FN svcno ){ VP addr; ER err; err = tk_get_res(tk_get_rid(taskid), svcno, &addr); if ( err < E_OK ) { return NULL; } return addr;}/* * Obtain process-related information */EXPORT ER PidToMinfo( W pid, FN svcno, VP *minfo ){ PINFO *pi; ER err; err = GetPidToPinfo(pid, &pi); if ( err < E_OK ) { return err; } err = tk_get_res(pi->resid, svcno, minfo); if ( err < E_OK ) { return E_NOEXS; } return E_OK;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -