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

📄 pcb.cpp

📁 ○1 设计进程进程控制块PCB表结构
💻 CPP
字号:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream.h>

#define STA_READY 0
#define STA_RUN   1
#define STA_END   2

/*struct PCBNode
 {
       char processName[10];
	   int  priorityNum;
       int  cputime;
       int  remaintime;
       int  status;
	   struct PCBNode *next;
 };
typedef struct PCBNode *PCBList;
struct Process
{
       char processName[10];
       int  cputime;
	   int  remaintime;
       int  needtime;
       int  priorityNum;
       int  status;
       struct Process *next;
};

bool InitQueue(linkQueue &q)

{
	q.front = q.rear =(Queueptr)malloc(sizeof(Qnode));
	q.front->next=NULL;
	return true;
}

bool EnQueue(linkQueue &q,ElemType e)

{
	struct Qnode *p;
	p = (Queueptr)malloc(sizeof(Qnode));
	p->date = e;p->next = NULL;
	q.rear->next=p;
	q.rear=p;
	return true;
}
bool DeQueue(linkQueue &q,ElemType &e)

{
	struct Qnode *p;
	if(q.front==q.rear)return false;
	p = q.front->next;
	e = p->date;
	q.front->next = p->next;if(q.rear==p)q.rear = q.front;
	free(p);
	return true;
}*/

/*struct Process *input(Qnode *p) 
{
	
	while(1);
	{
		struct process *p1;
		int  sign=0;
		p1=(struct process*)malloc(sizeof(struct process));
		printf("PLEASE INPUT NAME AND NEEDTIME\n");
		scanf("%s%d",&p1->processName,p1->needtime);
		head=InsertNode(head,p1);
		printf("继续添加学生信息请按1\n");
		printf("添加完毕请按0\n");
		scanf("%d",&sign);
		if(sign==0)
		break;
	}
	
	return head;
}
*/

void main()
{

}

⌨️ 快捷键说明

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