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

📄 sysbase.h

📁 一个操作系统,用C语言实现开发的,我在一个浙江大学的操作系统实验网站找到.大家学习以下
💻 H
字号:
// System APIs
// Definitions and Structures

#ifndef __SYSBASE_H
#define __SYSBASE_H

#include <knldefs.h>

// Interfaces
typedef struct _INVOKESTRUCT
{
	_u32 ebx, ecx, edx;
	_u32 esi, edi;
	_u32 uResult;
} INVOKESTRUCT;

// return -1 indicates error occurred
long SysInvoke(_u32 uFunc, INVOKESTRUCT *pIS);

// Basic system
#ifndef NO_SYSBASE
#define __SYSBASE

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _SYSVERSION
{
	_u32 uVersion;
	_u32 uBuild;
	_u32 uTime1, uTime2;
} SYSVERSION;

void SystemVersion(SYSVERSION *pVersion);
void ExitProcess(_u32 uExitCode);

#ifdef __cplusplus
}
#endif

#endif
// End of Basic system

// Filesystem
#ifndef NO_FILESYSTEM

#ifndef __FILESYSTEM
#define __FILESYSTEM
#endif

typedef _u32 HANDLE;

// Maximun length of path
#define MAX_PATH		1024

// CreateStruct
typedef struct _CREATEFILESTRUCT
{
	_u32	uSize;				// size of the structure
	_u32	uFlags;				// flags
} CREATEFILESTRUCT;

// IOCTL structure
typedef struct _IOCTLSTRUCT
{
	_u32	uCommand;			// ioctl command
	_u32	uInputBuffer;		// input buffer to send data to driver
	_u32	uInputSize;			// size of input buffer in bytes
	_u32	uOutputBuffer;		// output buffer to receive data from driver
	_u32	uOutputSize;		// size of output buffer in bytes
	_u32	uTransferSize;		// bytes tranferred during this operation
} IOCTLSTRUCT;

#endif
// End of Filesystem


// User defined services

#endif

⌨️ 快捷键说明

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