Logo ROOT   6.14/05
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 #include "TThreadImp.h"
25 
26 #include "Windows4Root.h"
27 
29 
30 class TWin32Thread : public TThreadImp {
31 
32 public:
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 
59 
60 friend class TWin32Thread;
61 
62 private:
63  void *fRoutine;
64  void *fArgument;
66 
67 public:
68  TWin32ThreadCleanUp(void **main,void *routine,void *arg);
70 };
71 
72 #endif
TWin32ThreadCleanUp * fNext
Definition: TWin32Thread.h:65
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:320
virtual Long_t SelfId()
Return the current thread's ID.
int main(int argc, char **argv)
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:1350
virtual Int_t CleanUpPush(void **main, void *free, void *arg)
virtual Int_t Run(TThread *th)
Win32 threads – spawn new thread (like pthread_create).
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).