Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_TThreadImp
25 #include "TThreadImp.h"
26 #endif
27 
28 #include "Windows4Root.h"
29 
31 
32 class TWin32Thread : public TThreadImp {
33 
34 public:
37 
38  virtual Int_t Join(TThread *th, void **ret);
39  virtual Long_t SelfId();
40  virtual Int_t Run(TThread *th);
41 
42  virtual Int_t Kill(TThread *th);
43 
44  virtual Int_t SetCancelOff();
45  virtual Int_t SetCancelOn();
46  virtual Int_t SetCancelAsynchronous();
47  virtual Int_t SetCancelDeferred();
48  virtual Int_t CancelPoint();
49 
50  virtual Int_t CleanUpPush(void **main, void *free,void *arg);
51  virtual Int_t CleanUpPop(void **main, Int_t exe);
52  virtual Int_t CleanUp(void **main);
53 
54  virtual Int_t Exit(void *ret);
55 
56  ClassDef(TWin32Thread,0) // TWin32Thread class
57 };
58 
59 
61 
62 friend class TWin32Thread;
63 
64 private:
65  void *fRoutine;
66  void *fArgument;
68 
69 public:
70  TWin32ThreadCleanUp(void **main,void *routine,void *arg);
72 };
73 
74 #endif
TWin32ThreadCleanUp * fNext
Definition: TWin32Thread.h:67
virtual Int_t CancelPoint()
virtual Int_t Kill(TThread *th)
This is a somewhat dangerous function; it's not suggested to Stop() threads a lot.
int Int_t
Definition: RtypesCore.h:41
virtual Int_t SetCancelDeferred()
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual Long_t SelfId()
Return the current thread's ID.
virtual Int_t SetCancelOff()
virtual Int_t CleanUpPop(void **main, Int_t exe)
virtual Int_t Exit(void *ret)
Exit the thread.
long Long_t
Definition: RtypesCore.h:50
virtual Int_t SetCancelAsynchronous()
virtual Int_t SetCancelOn()
#define free
Definition: civetweb.c:821
virtual Int_t CleanUpPush(void **main, void *free, void *arg)
virtual Int_t Run(TThread *th)
Win32 threads – spawn new thread (like pthread_create).
int main(int argc, char **argv)
virtual Int_t CleanUp(void **main)
virtual Int_t Join(TThread *th, void **ret)
Wait for specified thread execution (if any) to complete (like pthread_join).