00001 #line 126 "./lpsrc/flx_pthread.pak"
00002 #ifndef __FLX_PTHREAD_THREAD_H__
00003 #define __FLX_PTHREAD_THREAD_H__
00004 #include <flx_pthread_config.hpp>
00005
00006 #if FLX_WIN32
00007 #include <windows.h>
00008 #else
00009 #include <pthread.h>
00010 #endif
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 namespace flx { namespace pthread {
00021
00022
00023
00024
00025
00026
00027 #ifdef _WIN32
00028 typedef HANDLE flx_native_thread_t;
00029 #else
00030 typedef pthread_t flx_native_thread_t;
00031 #endif
00032
00033
00034
00035 class PTHREAD_EXTERN flx_detached_thread_t {
00036 flx_native_thread_t thr;
00037 flx_detached_thread_t(flx_detached_thread_t const&);
00038 void operator=(flx_detached_thread_t const&);
00039 public:
00040 flx_detached_thread_t();
00041 ~flx_detached_thread_t();
00042 int init(void (*start)(void*), void* udat);
00043 };
00044
00045
00046 class PTHREAD_EXTERN flx_thread_t {
00047 flx_native_thread_t thr;
00048 flx_thread_t(flx_thread_t const&);
00049 void operator=(flx_thread_t const&);
00050 public:
00051 flx_thread_t();
00052 ~flx_thread_t();
00053 int init(void (*start)(void*), void* udat);
00054 void join();
00055 };
00056
00057
00058 class PTHREAD_EXTERN flx_thread_wrapper_t {
00059 flx_thread_t thread;
00060 flx_thread_wrapper_t(flx_thread_wrapper_t const&);
00061 void operator=(flx_thread_wrapper_t const&);
00062 public:
00063 ~flx_thread_wrapper_t();
00064 flx_thread_wrapper_t(void (*start)(void*), void* udat);
00065 };
00066
00067 }}
00068 #endif
00069