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

📄 test.c

📁 操作系统:用C++编写的时间片轮转法
💻 C
字号:

#include "INDOS.C"
#include "Function.C"

void main()
{
	initInDos();
	initTcb();
	freeBuf = initBuf();
	oldInt8 = getvect(8);

	/* 创建0#线程 */
	strcpy(tcb[0].name,"main");
	tcb[0].state = RUNNING;
	tcb[0].value = 0;
	current = 0;	
	
	initView();
	printTcbState();
/*	setvect(8,newInt8);*/

	/* 启动多个线程的并发执行 */ 
	threadSwitch();

	while(allThreadFinished()) ;
	/* 终止多任务系统  */
	tcb[0].name[0] = '\0';
	tcb[0].state = FINISHED;

/*	setvect(8,oldInt8); */
	printTcbState();
	printf("\nMultiTask System terminated.\n");

	return ;
} /* main */

⌨️ 快捷键说明

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