thread_lists.h
上传用户:shtangtang
上传日期:2007-01-04
资源大小:167k
文件大小:1k
- #ifndef __THREADS_LISTS_H
- #define __THREADS_LISTS_H
- #include <thread_list.h>
- class pthread;
- //
- // the program needs two lists, one for each thread that is
- // active. And another for each thread requesting a wakeup
- // on thread reset signal.
- //
- class thread_list : public list<pthread *> {
- public:
- typedef list<pthread *>::iterator iterator;
- thread_list() { };
- ~thread_list() { };
- iterator locate(int);
- void remove(int);
- void restart(int);
- void suspend(int);
- pthread *self();
- static thread_list __waiting_s;
- static thread_list __threads;
- };
- #endif /* __THREADS_LISTS_H */