Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TWin32Thread.h
Go to the documentation of this file.
1 // @(#)root/thread:$Id$
2 // Author: Bertrand Bellenot 20/10/2004
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TWin32Thread
13 #define ROOT_TWin32Thread
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TWin32Thread //
19 // //
20 // This class provides an interface to the Win32 thread routines. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TThreadImp.h"
25 
26 #include "Windows4Root.h"
27 
28 class TWin32ThreadCleanUp;
29 
30 class TWin32Thread : public TThreadImp {
31 
32 public:
33  TWin32Thread() { }
34  ~TWin32Thread() { }
35 
36  virtual Int_t Join(TThread *th, void **ret);
37  virtual Long_t SelfId();
38  virtual Int_t Run(TThread *th);
39 
40  virtual Int_t Kill(TThread *th);
41 
42  virtual Int_t SetCancelOff();
43  virtual Int_t SetCancelOn();
44  virtual Int_t SetCancelAsynchronous();
45  virtual Int_t SetCancelDeferred();
46  virtual Int_t CancelPoint();
47 
48  virtual Int_t CleanUpPush(void **main, void *free,void *arg);
49  virtual Int_t CleanUpPop(void **main, Int_t exe);
50  virtual Int_t CleanUp(void **main);
51 
52  virtual Int_t Exit(void *ret);
53 
54  ClassDef(TWin32Thread,0) // TWin32Thread class
55 };
56 
57 
58 class TWin32ThreadCleanUp {
59 
60 friend class TWin32Thread;
61 
62 private:
63  void *fRoutine;
64  void *fArgument;
65  TWin32ThreadCleanUp *fNext;
66 
67 public:
68  TWin32ThreadCleanUp(void **main,void *routine,void *arg);
69  ~TWin32ThreadCleanUp() { }
70 };
71 
72 #endif