www.pudn.com > 哲学家进餐问题.rar > eatingStruct.h


//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