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

📄 queue.cpp

📁 操作系统——页面置换算法
💻 CPP
字号:
// Queue.cpp: implementation of the Queue class.
//
//////////////////////////////////////////////////////////////////////
#include"Queue.h"
Queue::Queue()
{
	head=new process(0,0);
	length=0;
	tail=head;
}


void Queue::insert(process* pro)
{	
	tail->next=pro;
	pro->prior=tail;
	pro->next=NULL;
	tail=pro;
}

process* Queue::pop()
{	
	process * pivot=head->next;
	head->next=pivot->next;
	return pivot;	
}

void Queue::delq(process* p)
{
	p->prior->next=p->next;
	if(p->next)
		p->next->prior=p->prior;
//	delete 
}
	
Queue::~Queue()
{

}

⌨️ 快捷键说明

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