⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 import.h

📁 T-kernel 的extension源代码
💻 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. * *---------------------------------------------------------------------- *//* *	import.h (memory) */#define	IMPORT_DEFINE	1#include "import_depend.h"/* procmap.c */IMPORT W ChkSysProgMap( ID did );#if IMPORT_DEFINE/* diskmap.c */IMPORT ID   GetMapDid( ID mid );IMPORT VP   mappingAddress( ME *me, PFE *pfe );IMPORT void CheckAccessDiskMap( PFE *pfe );IMPORT void CheckStateDiskMap( PFE *pfe );IMPORT ER   SyncDisk( DE *de, VW info, SyncOpt opt );IMPORT ER   PageInMapDisk( ID mid, VP laddr );IMPORT ER   PageOutMapDisk( PFE *pfe, BOOL nowrite );IMPORT ER   _MapDisk( ID diskid, PhyBlk block[], MapMode *mode );IMPORT ER   _UnmapDisk( ID mapid, UW flag );IMPORT ER   InitDiskMap( void );IMPORT void DumpMap( void );/* memmgr.c */IMPORT ER   ChkSysRsvMem( W npage );IMPORT VP   GetSysMemBlk( INT nblk, UINT attr );IMPORT ER   RelSysMemBlk( VP adr );IMPORT ER   RefSysMemInfo( T_RSMB *rsmb );IMPORT VP   AllocMemorySpace( W npage, UW lsid );IMPORT W    FreeMemorySpace( VP laddr, UW lsid );IMPORT ER   InitLocalMemory( PINFO *pinfo );IMPORT W    GetLocalMemoryUseCount( PINFO *pinfo );IMPORT ER   init_memmgr( void );IMPORT ER   start_memmgr( void );IMPORT ER   finish_memmgr( void );IMPORT ER   MemoryMgr( INT ac, UB *av[] );IMPORT void DumpMemoryTable( W pid );/* page.c */IMPORT VP   PFEtoLADR( PFE *pfe );IMPORT PFE* LADRtoPFE( VP laddr );IMPORT void InitPFE_Q( PFE_Q *pfe_q );IMPORT void SetTopPFE_Q( PFE_Q *pfe_q, PFE *pfe );IMPORT void InsertPFE_Q( PFE_Q *pfe_q, PFE *pfe );IMPORT void RemovePFE_Q( PFE_Q *pfe_q, PFE *pfe );IMPORT PFE* RemoveNextPFE_Q( PFE_Q *pfe_q );IMPORT PFE* NextPFE_Q( PFE_Q *pfe_q, PFE *pfe );IMPORT void RegistDBH( PFE *pfe );IMPORT void RemoveDBH( PFE *pfe );IMPORT ER   PageIn( VP laddr, UW lsid );IMPORT ER   CopyOnWrite( VP laddr, UW lsid );IMPORT void RegistPageFrame( PFE *pfe, PFS stat );IMPORT void MovePageFrame( PFE *pfe, PFS stat );IMPORT void DiscardPageFrame( PFE *pfe );IMPORT void DiscardPageFrameDE( DE *de );IMPORT W    GetPageFrame( PFE **pfe_p, DBN dbn, PFE *ppfe, UW rank );IMPORT void UngetPageFrame( PFE *pfe );IMPORT PFE* GetPFM( PFS stat, BOOL nowrite );IMPORT VP   AllocPhysicalMem( UW npage );IMPORT ER   UnlinkPage( PTE pte, PINFO *pinfo );IMPORT void LockPageFrame( PFE *pfe );IMPORT void UnlockPageFrame( PFE *pfe );IMPORT W    LockCount( PFE *pfe, VP laddr, UW lsid, W cnt );IMPORT void GetMemInfo( MemoryInfo *info );IMPORT W    AvailablePages( void );IMPORT W    LockablePages( W *nopgout_p );IMPORT W    MaxPreLoad( void );IMPORT ER   InitPageFrameEntry( RealMemoryInfo *meminfo );IMPORT ER   InitCyclicProcess( void );IMPORT void DumpPF( UW opt );IMPORT void DumpSegInfo( void );/* segio.c */IMPORT DE      *DiskEntryTable;IMPORT BOOL    isRemovableDisk( ID did );IMPORT BOOL    isMemoryDisk( ID did );IMPORT PhyBlk* CutPhyBlks( ID did, PhyBlk *pb, UW pgofs, UW pgsiz );IMPORT void    GetPageFileInfo( UW *total, UW *use );IMPORT void    FreePageFile( W pfbn );IMPORT ER      OpenPageFile( LINK *lnk );IMPORT ER      ClosePageFile( BOOL force );IMPORT ER      PageInPageFile( PTH *pth, VP laddr, UW lsid );IMPORT ER      PageOutPageFile( PFE *pfe, BOOL nowrite );IMPORT void    CheckAccessPageFile( PFE *pfe );IMPORT FP      SearchErrHdr( ID tid );IMPORT ER      _NotifyDiskErr( FP errhdr );IMPORT UW      MaxPageIO;IMPORT ER      ReadWritePFE( PFE *pfe, W cmd );IMPORT ER      ReadWritePFE_IndQue( IndQueTop *pfe_q, W cmd );IMPORT DE*     checkDiskID( ID diskid );IMPORT ER      _AttachFS( TC *devname, UW omode, PINFO *pinfo, DiskInfo *diskinfo );IMPORT ER      _DetachFS( ID diskid, PINFO *pinfo, BOOL eject );IMPORT ER      _CheckFS( TC *devname, UW omode, PINFO *pinfo );IMPORT ER      _InformFS( ID diskid, FsSpec *spec );IMPORT ER      _SyncFS( ID diskid, VW info );IMPORT ER      InitSegIO( void );IMPORT void    DumpPageFile( void );/* segmgr.c */IMPORT FastLock SegLock;IMPORT FastLock FsLock;IMPORT ER       GetSysConf_log( UB *name, W *val, W n );IMPORT ER       GetSysConf_bms( UB *name, W *val, W n );IMPORT VP       AllocRealMem( RealMemoryInfo *meminfo, UW size );IMPORT void     InitFMB( FMB_Pool *fmbp, UW size );IMPORT VP       AllocFMB( FMB_Pool *fmbp, BOOL nowrite );IMPORT void     FreeFMB( FMB_Pool *fmbp, VP adr );IMPORT void     InitIndQue( IndQueTop *top );IMPORT void     DeleteIndQue( IndQueTop *top );IMPORT ER       InsertIndQue( IndQueTop *top, VP ent, BOOL nowrite );IMPORT void     RemoveIndQue( IndQueTop *top, VP ent );IMPORT IndQue*  NextIndQue( IndQueTop *top, IndQue *pos );IMPORT ER       init_segmgr( void );IMPORT ER       start_segmgr( void );IMPORT ER       finish_segmgr( void );IMPORT ER       SegmentMgr( INT ac, UB *av[] );/* fileaccess.c */IMPORT ER ExecFileCheck(POBJ_HDR *pohdr);IMPORT ER ExecFileOpen(POBJ_HDR *pohdr);IMPORT ER ExecFileGetName(POBJ_HDR *pohdr, TC *name);IMPORT ER ExecFileRead(POBJ_HDR *pohdr, VB *buf, W size, W ofs, W *rsize, VP exinf);IMPORT ER ExecFileClose(POBJ_HDR *pohdr);IMPORT ER ExecFileRecInfo(POBJ_HDR *pohdr, W *offset, W *recsize, PhyBlk *block, W entry_len, W *n_entry);/* ptraccess.c */IMPORT ER ExecPtrOpen(POBJ_HDR *pohdr);IMPORT ER ExecPtrName(POBJ_HDR *pohdr, TC *name);IMPORT ER ExecPtrRead(POBJ_HDR *pohdr, VB *buf, W size, W ofs, W *rsize, VP exinf);IMPORT ER ExecPtrClose(POBJ_HDR *pohdr);/* compress.c */IMPORT ER buffer_uncompress( UB *dst, UB* src, W dlen, W slen );/* memset_w.c (common) */IMPORT void* memset_w( void *mem, int ch, size_t len );#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -