📄 prcmgr.h
字号:
/* *---------------------------------------------------------------------- * 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. * *---------------------------------------------------------------------- *//* * prcmgr.h (proc) * * Common definitions of process management */#include <basic.h>#include <tk/tkernel.h>#include <tk/util.h>#include <extension/extension.h>#include <extension/proctask.h>#include <sys/pinfo.h>#include <sys/util.h>#include <libstr.h>#include <tstring.h>#include <sys/queue.h>#include <sys/debug.h>#include <bzcomp.h>#include <sys/procdef.h>#include <sys/tkseconf.h>#include "cputype.h"/* * Specific management information for process management (MINFO) * Since PINFO can be seen by managers outside process management, * it has a low degree of independence. MINFO is preferable * when used in process management alone. (010615) */struct prcminfo { PINFO *pinfo; /* Link to PINFO */ QUEUE dynldq; /* Link to dynamic load management information */};IMPORT FastLock ProcMgrLock; /* Exclusive control lock for process management */IMPORT UINFO UserInfo; /* User information */IMPORT PINFO *TopPI; /* Start of PINFO[] */#define INIT_PINFO TopPI /* PINFO on initial process (INIT) */#define TPA_RNGMASK (TPA_RNG0 | TPA_RNG1 | TPA_RNG2 | TPA_RNG3)#define TPA_INPUTMASK (TPA_LINK | TPA_SEIO | TPA_PTR)#define TMA_INPUTMASK (TMA_LINK | TMA_SEIO | TMA_PTR)#if VIRTUAL_ADDRESS/* Mapping of user process/stack */IMPORT ER MapProc(PINFO *pi, POBJ_HDR *pohdr, FP *entry);IMPORT ER UnmapProc(PINFO *pi);IMPORT ER MapStack(PINFO *pi, W stksz, VP *laddr);IMPORT ER UnmapStack(PINFO *pi, VP laddr);#else/* Loading of user process */IMPORT ER InitLoadInfo(W maxproc);IMPORT ER LoadProc(PINFO *pi, POBJ_HDR *pohdr, FP *entry);IMPORT void UnloadProc(PINFO *pi);#endif/* Debug support function */IMPORT void DumpMap( void );IMPORT void DumpMemoryTable( W pid );IMPORT void DumpPF( UW opt );IMPORT void DumpSegInfo( void );IMPORT void DumpPageFile( void );IMPORT void DumpSpace( W pid, VP sadr, VP eadr);#define IMPORT_DEFINE 1#if IMPORT_DEFINE/* prcmgr.c */IMPORT W MAX_SUBTASKS ;IMPORT PINFO *TopPI;IMPORT QUEUE UsedPI;IMPORT W PINFO_sz;IMPORT FastLock ProcMgrLock;IMPORT BOOL CheckSubTask(ID tid);IMPORT void _ExitTask( PINFO *pi, ID tskid );IMPORT void MakeFirstProc(TC *name, PRI ipri);IMPORT ER _tkse_abo_prc(ID pid, W abort_code);IMPORT void KillAllProcess();IMPORT ER ProcessMgr( INT ac, UB *av[] );/* profil.c */IMPORT ER pi_profil(PINFO *pi, P_PROFILINF *pbuf);/* system.c */IMPORT ER _tkse_get_ver( T_VER *version );IMPORT ER _tkse_lod_spg2( LINK *lnk, TC *arg, VW info[] );IMPORT ER _tkse_lod_spg( T_LSPG *pk_sysprg, TC *arg, VW info[] );IMPORT ER _tkse_unl_spg( W progid );/* debug.c */IMPORT W ForceLoadFlag ;IMPORT W DebugMonitorFlag ;IMPORT W LazyMode;IMPORT W _DebugFunc(W fn, W p1, W p2, W p3);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -