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

📄 util.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. * *---------------------------------------------------------------------- *//* *	util.h (extension) * *	Utility for application */#ifndef __EXTENSION_UTIL_H__#define __EXTENSION_UTIL_H__#include <basic.h>#include "typedef.h"#ifdef __cplusplusextern "C" {#endif/* * Shared memory */IMPORT void*	Scalloc( size_t nmemb, size_t size );IMPORT void*	Smalloc( size_t size );IMPORT void*	Srealloc( void *ptr, size_t size );IMPORT void	Sfree( void *ptr );IMPORT void	Smalloctest( int mode );IMPORT BOOL	Smalloccheck( void *ptr );/* * Fast lock *	One BFastLock can be used as up to 16 independent locks. *	Identified by lock number (no); 0 to 15 can be specified as number. */typedef struct {	UH	wai;	UH	flg;	ID	flgid;} BFastLock;IMPORT ER	CreateBLock( BFastLock *lock );IMPORT ER	DeleteBLock( BFastLock *lock );IMPORT ER	BMLock( BFastLock *lock, W no );IMPORT ER	BMLockTmo( BFastLock *lock, W no, TMOUT tmo );IMPORT ER	BMUnlock( BFastLock *lock, W no );#define	BLock(lock)		BMLock(lock, 0)#define	BLockTmo(lock, tmo)	BMLockTmo(lock, 0, tmo)#define	BUnlock(lock)		BMUnlock(lock, 0)#ifdef __cplusplus}#endif#endif /* __EXTENSION_UTIL_H__ */

⌨️ 快捷键说明

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