📄 ofcb.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. * *---------------------------------------------------------------------- *//* * ofcb.h (file) * * File management * Open file control block */#ifndef _FM_OFCB_H_#define _FM_OFCB_H_/* * Open file control block */typedef struct OFCB { QUEUE q; /* For OFCB connection */ struct FsInfo *fsinfo; /* Belonging file system */ /* Open file information */ W ref; /* Reference count of this file */ FID fid; /* File ID */ struct omode { /* Open mode (Mode-specific counter) */ UH excl; /* The number of exclusive opens */ UH wexcl; /* The number of exclusive write opens */ UH read; /* The number of read opens */ UH write; /* The number of write opens */ } omode; /* Disk information */ ER dskErr; /* For recording of asynchronous errors */ /* File header information */ DskAdr fhead; /* Location of the file header */ H idxlv; /* Index level */ UH ridxofs; /* Location of the record index */ W nrec; /* Total record count */ /* Record information */ QUEUE rcb; /* For connection of record control block (RCB) */} OFCB;/* * File open parameter */typedef struct OpenPara { FID fid; /* File ID */ /* Information of file header block */ DfFileHeaderBlock *fhd; /* Mapped address */ DskAdr dadr; /* Location on the disk */} OpenPara;IMPORT OFCB* fmpGetOFCB( OpenPara *opara, struct FsInfo *fsinfo, ER *err );IMPORT void fmpRemoveOFCB( OFCB *ofcb, BOOL force );IMPORT ER fmpDeleteAllOFCB( struct FsInfo *fsinfo );IMPORT ER fmpCheckExclusiveOpen( OFCB *ofcb, UW omode );IMPORT ER fmpOpenOFCB( OFCB *ofcb, UW omode );IMPORT void fmpCloseOFCB( OFCB *ofcb, UW omode );#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -