Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 Int_t Join(TThread *th, void **ret) override;
37 Long_t SelfId() override;
38 Int_t Run(TThread *th, const int affinity = -1) override;
39
40 Int_t Kill(TThread *th) override;
41
42 Int_t SetCancelOff() override;
43 Int_t SetCancelOn() override;
45 Int_t SetCancelDeferred() override;
46 Int_t CancelPoint() override;
47
48 Int_t CleanUpPush(void **main, void *free,void *arg) override;
49 Int_t CleanUpPop(void **main, Int_t exe) override;
50 Int_t CleanUp(void **main) override;
51
52 Int_t Exit(void *ret) override;
53
54 ClassDefOverride(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 main()
Definition Prototype.cxx:12
int Int_t
Definition RtypesCore.h:45
long Long_t
Definition RtypesCore.h:54
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
#define free
Definition civetweb.c:1539
<div class="legacybox"><h2>Legacy Code</h2> TThread is a legacy interface: there will be no bug fixes...
Definition TThread.h:40
TWin32ThreadCleanUp * fNext
Int_t SetCancelOff() override
Int_t CleanUpPop(void **main, Int_t exe) override
Int_t Exit(void *ret) override
Exit the thread.
Int_t SetCancelOn() override
Int_t SetCancelDeferred() override
Int_t CleanUp(void **main) override
Long_t SelfId() override
Return the current thread's ID.
Int_t SetCancelAsynchronous() override
Int_t CancelPoint() override
Int_t CleanUpPush(void **main, void *free, void *arg) override
Int_t Kill(TThread *th) override
This is a somewhat dangerous function; it's not suggested to Stop() threads a lot.
Int_t Join(TThread *th, void **ret) override
Wait for specified thread execution (if any) to complete (like pthread_join).
Int_t Run(TThread *th, const int affinity=-1) override
Win32 threads – spawn new thread (like pthread_create).