00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _CAVERNPLUS_THREAD_C
00018 #define _CAVERNPLUS_THREAD_C
00019
00020 #include "CAVERN.hxx"
00021
00022 typedef void* (*CAVERN_THREADED_FUNC)(void*);
00023
00024 #ifdef CAVERN_USE_GLOBUS_THREADS
00025 typedef globus_thread_t CAVERN_THREAD_T;
00026 #elif defined(CAVERN_USE_PTHREADS)
00027 typedef pthread_t CAVERN_THREAD_T;
00028 #elif defined(WIN32) && defined(CAVERN_USE_WINDOWSTHREADS)
00029 typedef unsigned CAVERN_THREAD_T;
00030
00031
00032 #else
00033 #error One of CAVERN_USE_GLOBUS_THREADS, CAVERN_USE_PTHREADS, or CAVERN_USE_WINDOWSTHREADS must be defined.
00034 #endif
00035
00042 class CAVERNts_thread_c {
00043 public:
00044
00054 int create(void * (*threaded_func)(void *), void *arg);
00055
00057 CAVERN_THREAD_T *getThread();
00058
00059
00060
00061 private:
00062 CAVERN_THREAD_T itsThread;
00063
00064 };
00065 #endif