?? dining.h
字號:
#ifndef _DINING_PHILOSOPHERS#define _DINING_PHILOSOPHERS#include <thread.h>using namespace cpp_threads;class dining {private: int philosophers; Pthread **p; Semaphore p_finish; Mutex *p_fork;public: dining(int); virtual ~dining(); int nr(); void open(); void finished(int); bool isLocked(int); virtual bool get_forks(int); virtual void put_forks(int);};#endif /* DINING PHILOSOPHERS */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -