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

📄 sys.h

📁 这个linux源代码是很全面的~基本完整了~使用c编译的~由于时间问题我没有亲自测试~但就算用来做参考资料也是非常好的
💻 H
字号:
/* * Environment provided by system and miscellaneous definitions * * Copyright (C) Eicon Technology Corporation, 2000. * * Eicon File Revision :    1.2   * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * */#if !defined(SYS_H)#define SYS_H/* abreviations for unsigned types */typedef int boolean_t;typedef unsigned char byte;typedef unsigned long dword;typedef unsigned short word;/* abreviations for volatile types */typedef volatile byte	vbyte;typedef volatile word	vword;typedef volatile dword	vdword;/* Booleans */#if !defined(TRUE)#define TRUE    (1)#define FALSE   (0)#endif/* NULL pointer */#if !defined(NULL)#define NULL    ((void *) 0)#endif/* Return the dimension of an array */#if !defined(DIM)#define DIM(array)  (sizeof (array)/sizeof ((array)[0]))#endif/* * Return the number of milliseconds since last boot */extern	dword	UxTimeGet(void);extern	void 	DivasSprintf(char *buffer, char *format, ...);extern	void 	DivasPrintf(char *format, ...);/* fatal errors, asserts and tracing */void HwFatalErrorFrom(char *file, int line);void HwFatalError(void);/* void HwAssert(char *file, int line, char *condition); */#include <linux/kernel.h>#include <linux/string.h>#define _PRINTK printk#define _PRINTF	DivasPrintfvoid _PRINTF(char *format, ...);#define PRINTF(arg_list)	_PRINTF arg_list#if defined DTRACE# define DPRINTF(arg_list)	_PRINTF arg_list# define KDPRINTF(arg_list)	_PRINTF arg_list ; _PRINTK arg_list ; _PRINTK("\n");#else# define DPRINTF(arg_list)	(void)0# define KDPRINTF(arg_list)	_PRINTK arg_list ; _PRINTK("\n");#endif#if !defined(ASSERT)#if defined DEBUG || defined DBG# define HwFatalError()	HwFatalErrorFrom(__FILE__, __LINE__)# define ASSERT(cond)								\		if (!(cond)) 								\		{											\/*			HwAssert(__FILE__, __LINE__, #cond);*/	\		}#else# define ASSERT(cond)	((void)0)#endif#endif /* !defined(ASSERT) */#define TRACE	(_PRINTF(__FILE__"@%d\n", __LINE__))#endif /* SYS_H */

⌨️ 快捷键说明

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