timecycle.h

来自「首先这个程序是在Linux下写的」· C头文件 代码 · 共 52 行

H
52
字号
// TimeCycle.h: interface for the TimeCycle class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TIMECYCLE_H__35C48369_6AE4_49FA_AE22_B5D5FADA52D6__INCLUDED_)
#define AFX_TIMECYCLE_H__35C48369_6AE4_49FA_AE22_B5D5FADA52D6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include"Process.h"
#include <cstdio>
#include<iostream>
#include<list>
#include<map>
using namespace std;

#define INTPMAP map<int,Process*>

class TimeCycle  
{
public:
	void Help();
	void ShowInfo();

	void Dispatch();
	void TimeOut();
	void SysManualRun();
	void Create();		//create process
	void Kill(int pid);//kill the process 

	void Block();//block the process
	void Wakeup(); //wake up the process

	void Suspended();//suspend the process
	void Active();   //active process

	TimeCycle();
	virtual ~TimeCycle();

private:

	map<int,Process*> w_promap;	
	int w_running;
	list<int> readyq;
	list<int> blockedq;

};

#endif // !defined(AFX_TIMECYCLE_H__35C48369_6AE4_49FA_AE22_B5D5FADA52D6__INCLUDED_)

⌨️ 快捷键说明

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