Logo ROOT   6.16/01
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
30class TWin32Thread : public TThreadImp {
31
32public:
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();
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
60friend class TWin32Thread;
61
62private:
63 void *fRoutine;
64 void *fArgument;
66
67public:
68 TWin32ThreadCleanUp(void **main,void *routine,void *arg);
70};
71
72#endif
int Int_t
Definition: RtypesCore.h:41
long Long_t
Definition: RtypesCore.h:50
#define ClassDef(name, id)
Definition: Rtypes.h:324
#define free
Definition: civetweb.c:1539
TWin32ThreadCleanUp(void **main, void *routine, void *arg)
TWin32ThreadCleanUp * fNext
Definition: TWin32Thread.h:65
virtual Int_t CancelPoint()
virtual Int_t Exit(void *ret)
Exit the thread.
virtual Int_t CleanUpPop(void **main, Int_t exe)
virtual Int_t SetCancelAsynchronous()
virtual Int_t Join(TThread *th, void **ret)
Wait for specified thread execution (if any) to complete (like pthread_join).
virtual Int_t SetCancelOn()
virtual Int_t Run(TThread *th)
Win32 threads – spawn new thread (like pthread_create).
virtual Int_t SetCancelOff()
virtual Long_t SelfId()
Return the current thread's ID.
virtual Int_t CleanUpPush(void **main, void *free, void *arg)
virtual Int_t SetCancelDeferred()
virtual Int_t CleanUp(void **main)
virtual Int_t Kill(TThread *th)
This is a somewhat dangerous function; it's not suggested to Stop() threads a lot.
int main(int argc, char **argv)