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

📄 pcb.cpp

📁 这是软件工程的关于模拟进程调度的课程论文
💻 CPP
字号:
// PCB.cpp: implementation of the PCB class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ProcessManager.h"
#include "PCB.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////



PCB::PCB(UINT prio, UINT ttime, UINT nid, CString strname)
{
	ASSERT(prio<256);
	ASSERT((ttime<400) && (ttime>10));
	ASSERT(nid<256);

	//initial
	this->priority = prio;
	this->total_time = ttime;
	this->nid = nid;
	this->strname = strname;

	//other infomation
	this->sleep_time = 0;				
	this->dynprio = 0;			
	this->current_time = 0;		
	this->state = PS_NOTHING;		//新建进程都无状态
	this->next = this->prev = NULL;
	this->wait_time = 0;
}

⌨️ 快捷键说明

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