Logo ROOT  
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
TWin32Thread::SetCancelOff
virtual Int_t SetCancelOff()
Definition: TWin32Thread.cxx:129
Windows4Root.h
TThread
Definition: TThread.h:40
TWin32ThreadCleanUp::fNext
TWin32ThreadCleanUp * fNext
Definition: TWin32Thread.h:65
TWin32Thread::Exit
virtual Int_t Exit(void *ret)
Exit the thread.
Definition: TWin32Thread.cxx:70
TWin32Thread::SetCancelDeferred
virtual Int_t SetCancelDeferred()
Definition: TWin32Thread.cxx:156
TWin32Thread::Run
virtual Int_t Run(TThread *th)
Win32 threads – spawn new thread (like pthread_create).
Definition: TWin32Thread.cxx:33
TWin32Thread::~TWin32Thread
~TWin32Thread()
Definition: TWin32Thread.h:34
TWin32ThreadCleanUp::fArgument
void * fArgument
Definition: TWin32Thread.h:64
Int_t
int Int_t
Definition: RtypesCore.h:45
TWin32Thread::CancelPoint
virtual Int_t CancelPoint()
Definition: TWin32Thread.cxx:165
TWin32Thread::SetCancelOn
virtual Int_t SetCancelOn()
Definition: TWin32Thread.cxx:138
TWin32Thread::CleanUpPush
virtual Int_t CleanUpPush(void **main, void *free, void *arg)
Definition: TWin32Thread.cxx:91
TWin32ThreadCleanUp::~TWin32ThreadCleanUp
~TWin32ThreadCleanUp()
Definition: TWin32Thread.h:69
TWin32Thread::TWin32Thread
TWin32Thread()
Definition: TWin32Thread.h:33
TWin32Thread::CleanUpPop
virtual Int_t CleanUpPop(void **main, Int_t exe)
Definition: TWin32Thread.cxx:100
TWin32Thread::Join
virtual Int_t Join(TThread *th, void **ret)
Wait for specified thread execution (if any) to complete (like pthread_join).
Definition: TWin32Thread.cxx:54
Long_t
long Long_t
Definition: RtypesCore.h:54
TWin32Thread
Definition: TWin32Thread.h:30
main
int main(int argc, char **argv)
Definition: histspeedtest.cxx:751
TThreadImp
Definition: TThreadImp.h:31
TWin32ThreadCleanUp::TWin32ThreadCleanUp
TWin32ThreadCleanUp(void **main, void *routine, void *arg)
Definition: TWin32Thread.cxx:178
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TWin32Thread::CleanUp
virtual Int_t CleanUp(void **main)
Definition: TWin32Thread.cxx:112
TWin32Thread::SetCancelAsynchronous
virtual Int_t SetCancelAsynchronous()
Definition: TWin32Thread.cxx:147
TThreadImp.h
TWin32Thread::SelfId
virtual Long_t SelfId()
Return the current thread's ID.
Definition: TWin32Thread.cxx:122
free
#define free
Definition: civetweb.c:1539
TWin32ThreadCleanUp
Definition: TWin32Thread.h:58
TWin32ThreadCleanUp::fRoutine
void * fRoutine
Definition: TWin32Thread.h:63
TWin32Thread::Kill
virtual Int_t Kill(TThread *th)
This is a somewhat dangerous function; it's not suggested to Stop() threads a lot.
Definition: TWin32Thread.cxx:80