source: cheroxy/branches/b0_1_threading/include/CRXThread.h@ 9

Last change on this file since 9 was 9, checked in by cheese, 12 years ago

#1 fix mutex code

File size: 616 bytes
RevLine 
[7]1/*
2 * CRXThread.h
3 */
4
5#ifdef _WIN32
6# include <windows.h>
7# include <process.h>
[9]8# define CRX_THREAD_TYPE void
[7]9#else
10# include <pthread.h>
[9]11# define CRX_THREAD_TYPE void *
[7]12#endif
13
[9]14typedef CRX_THREAD_TYPE (* CRX_THREAD_CALLBACK) (void *);
15
[7]16class CRXThread
17{
18private:
[9]19 bool mIsRunnable;
[7]20
[9]21 CRX_THREAD_CALLBACK mCallback;
22 void * mThreadArg;
[7]23
24public:
[9]25 CRXThread (void);
26 ~CRXThread (void);
[7]27
28public:
[9]29 void Create (void);
[7]30
[9]31 virtual int Run (void);
32 void Stop (void);
33 inline void SetRunnable (bool aIsRunnable);
34 inline bool IsRunnable (void) const;
[7]35};
36
37
Note: See TracBrowser for help on using the repository browser.