Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CAVERNts_thread_c.hxx

00001 /******************************************************************
00002  * CAVERNsoft
00003  * Copyright (C) 1994-2000 Electronic Visualization Laboratory,
00004  * all rights reserved
00005  * By Jason Leigh, Yong-joo Cho, Naveen Krishnaprasad, Chris Scharver,
00006  * Stuart Bailey, Atul Nayak, Shalini Venkataraman
00007  * University of Illinois at Chicago
00008  * 
00009  * This publication and its text and code may not be copied for commercial 
00010  * use without the express written permission of the University of Illinois
00011  * at Chicago.
00012  * The contributors disclaim any representation of warranty: use this
00013  * code at your own risk.
00014  * Direct questions, comments etc to cavern@evl.uic.edu
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 //    typedef unsigned (__stdcall *CAVERN_THREADED_FUNC)(void *);
00031 //      typedef unsigned (__stdcall *THREAD_START) (void *);
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     //Pthread exit function - works only for Unix based systems with pthread support
00060 
00061 private:
00062         CAVERN_THREAD_T itsThread;
00063         
00064 };
00065 #endif

Generated at Mon Jul 2 14:24:43 2001 for CAVERNsoft by doxygen1.2.8-20010617 written by Dimitri van Heesch, © 1997-2001