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

📄 file_system.c

📁 国内一位牛人自己开发的操作系统
💻 C
字号:
#include"../include/os.h"

extern void enter_file_system(void );
extern int idle_device(struct file_system_call_parameter *par);

static void init_file_system_routine(int file_system_id)
{
	REG r;
	union system_call_parameter *par;

	print("\n                ",file_system_id);

	par=get_kernel_parameter();


	RESET_CAPABILITY(par->process_attribute.capability);
	RESET_CAPABILITY(par->process_attribute.process.capability);
	r.ax=11;r.bx=file_system_id;
	call_kernel(&r);
	print("query file system processor resource,result is ",r.ax);

	par->process_attribute.process.max_thread_number=THREAD_NUMBER;
	par->process_attribute.process.max_semaphore_number=SEMAPHORE_NUMBER;
	RESET_CAPABILITY(par->process_attribute.capability);
	RESET_CAPABILITY(par->process_attribute.process.capability);
	par->process_attribute.process.driver=idle_device;
	par->process_attribute.process.semaphore=-1;
	par->process_attribute.process.start_point.ip=enter_file_system;
	par->process_attribute.process.start_point.cs=0x23;
	par->process_attribute.process.start_point.ds=0x2b;
	par->process_attribute.process.start_point.ss=0x2b;

	r.ax=10;r.bx=file_system_id;
	call_kernel(&r);
	print("\n                ",file_system_id);
	print("allocate processor resource for file system,result is ",r.ax);
	print_string("\n\n");

	return ;
}
void init_file_system(void)
{
	init_file_system_routine(1);
	init_file_system_routine(2);
}

⌨️ 快捷键说明

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