00001 // @(#)root/thread:$Id: TWin32Thread.h 35197 2010-09-08 12:34:39Z rdm $ 00002 // Author: Bertrand Bellenot 20/10/2004 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TWin32Thread 00013 #define ROOT_TWin32Thread 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TWin32Thread // 00019 // // 00020 // This class provides an interface to the Win32 thread routines. // 00021 // // 00022 ////////////////////////////////////////////////////////////////////////// 00023 00024 #ifndef ROOT_TThreadImp 00025 #include "TThreadImp.h" 00026 #endif 00027 00028 #include "Windows4Root.h" 00029 00030 class TWin32ThreadCleanUp; 00031 00032 class TWin32Thread : public TThreadImp { 00033 00034 public: 00035 TWin32Thread() { } 00036 ~TWin32Thread() { } 00037 00038 virtual Int_t Join(TThread *th, void **ret); 00039 virtual Long_t SelfId(); 00040 virtual Int_t Run(TThread *th); 00041 00042 virtual Int_t Kill(TThread *th); 00043 00044 virtual Int_t SetCancelOff(); 00045 virtual Int_t SetCancelOn(); 00046 virtual Int_t SetCancelAsynchronous(); 00047 virtual Int_t SetCancelDeferred(); 00048 virtual Int_t CancelPoint(); 00049 00050 virtual Int_t CleanUpPush(void **main, void *free,void *arg); 00051 virtual Int_t CleanUpPop(void **main, Int_t exe); 00052 virtual Int_t CleanUp(void **main); 00053 00054 virtual Int_t Exit(void *ret); 00055 00056 ClassDef(TWin32Thread,0) // TWin32Thread class 00057 }; 00058 00059 00060 class TWin32ThreadCleanUp { 00061 00062 friend class TWin32Thread; 00063 00064 private: 00065 void *fRoutine; 00066 void *fArgument; 00067 TWin32ThreadCleanUp *fNext; 00068 00069 public: 00070 TWin32ThreadCleanUp(void **main,void *routine,void *arg); 00071 ~TWin32ThreadCleanUp() { } 00072 }; 00073 00074 #endif