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

📄 gname_def.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. * *---------------------------------------------------------------------- *//* *	gname_def.h (gname) * *	Global name management */#ifndef __GName_Def_H__#define __GName_Def_H__ 1#include <basic.h>#include <sys/queue.h>/* It is assumed the entry count of the global name is about 256. *//* A prime is desirable. */#define NumOfHashEntries	257#define HashRate		NumOfHashEntries/* Maximum character count of the global name */#define GlobalNameLengthLimit	256#ifdef DEBUG#  define NumOfPoolEntries	256#endif/* For storing the global name */typedef struct {	W	numOfNames;			/* Valid character count */	TC	name[GlobalNameLengthLimit];	/* Global name */} GlobalName;/* Entry holding the global data */typedef struct {	QUEUE		queue;		/* link for QUEUE */	UW		searchKey;	/* Value of the hashed global name */	ID		pid;		/* Process ID */	GlobalName	gname;		/* Global name */	W		data;		/* Data */	UW		atr;		/* Attribute */} GNameEntry;#define InvalidKey		(-1)#define InvalidPID		(0)#define OffsetOfSearchKey	8#define OffsetOfPID		12/* For entry management  The first one of the queue *//* As a result of the global name being hashed, the collided entry is linked. */typedef QUEUE	ListOfEntry;/* Prototype */#ifdef DEBUGIMPORT ID	getPID(void);#endif#endif /* __GName_Def_H__ */

⌨️ 快捷键说明

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