VC++调试通过
(C)copyright by Neo
欢迎大家测试 请问题请Email:sony@com*/
#include
#include
#include
const int MAXQUEUE=; //定义表的最大行数
typedef struct node{
int resource;
int process;
}cell;
cell occupy[MAXQUEUE];
int occupy_quantity;
cell wait[MAXQUEUE];
int wait_quantity;
//初始化函数
void initial()
{
int i;
for(i=;i occupy[i].process=-1;
occupy[i].resource=-1;
wait[i].process=-1;
wait[i].resource=-1;
}
[1] [2] [3] [4] [5]