eatingstruct.h

来自「计算机操作系统原理与实现中的重要实验」· C头文件 代码 · 共 40 行

H
40
字号
//eatingStruct.h 
//this file including the mutexs and some other important shared varaible
//written in 2004/6/2 23:50


#ifndef EATING_STRUCT_H
#define EATING_STRUCT_H

#define THINKER_NUM 5

typedef struct
{
	HANDLE tropics[THINKER_NUM];
	HANDLE ThreadExit;
	HWND   m_view;
	int    thinkerStatus[THINKER_NUM];
	int    tropicStatus[THINKER_NUM];
	int    ThinkerCnt;
	int     m_speed;
	CRect   userect[THINKER_NUM];
	CRect   Idlerect[THINKER_NUM];
	CRect   thinkerRect[THINKER_NUM];
	

}Thinkers, *pThinkers;

enum
{
	NORMAL_STATUS,
	THINKING_STATUS,
	HUNGRY_STATUS,
	EATING_STATUS
};
//typedef Thinkers* pThinkers;





#endif

⌨️ 快捷键说明

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