📄 prcutil2.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. * *---------------------------------------------------------------------- *//* * prcutil2.c (proc) * * Kernel utility * Process management related */#include <basic.h>#include <tk/tkernel.h>#include <sys/util.h>#include <sys/pinfo.h>/* * Obtain current task ID * The result is undefined when called from outside the task. */EXPORT ID GetMyTid( void ){ return tk_get_tid();}/* * Obtain current process ID */EXPORT ID GetMyPid( void ){ PINFO *pinfo = GetPinfo(TSK_SELF); return ( pinfo == NULL )? E_CTX: pinfo->procid;}/* * Obtain management information on current process */EXPORT ER GetMyPinfo( PINFO **pinfo ){ *pinfo = GetPinfo(TSK_SELF); return ( *pinfo == NULL )? E_CTX: E_OK;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -