ROOT
6.08/07
Reference Guide
core
thread
src
TWin32ThreadFactory.cxx
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
//////////////////////////////////////////////////////////////////////////
13
// //
14
// TWin32ThreadFactory //
15
// //
16
// This is a factory for Win32 thread components. //
17
// //
18
//////////////////////////////////////////////////////////////////////////
19
20
#include "
TWin32ThreadFactory.h
"
21
#include "
TWin32Mutex.h
"
22
#include "
TWin32Condition.h
"
23
#include "
TWin32Thread.h
"
24
25
// Force creation of TWin32ThreadFactory when shared library will be loaded
26
// (don't explicitly create a TWin32ThreadFactory).
27
static
TWin32ThreadFactory
gWin32ThreadFactoryCreator
;
28
29
ClassImp
(
TWin32ThreadFactory
)
30
31
////////////////////////////////////////////////////////////////////////////////
32
/// Create Win32 thread factory. Also sets global gThreadFactory to this.
33
34
TWin32ThreadFactory
::
TWin32ThreadFactory
(const
char
*
name
, const
char
*title) :
35
TThreadFactory
(name, title)
36
{
37
gThreadFactory
=
this
;
38
}
39
40
////////////////////////////////////////////////////////////////////////////////
41
/// Return a Win32 Mutex.
42
43
TMutexImp
*
TWin32ThreadFactory::CreateMutexImp
(
Bool_t
recursive)
44
{
45
return
new
TWin32Mutex
(recursive);
46
}
47
48
////////////////////////////////////////////////////////////////////////////////
49
/// Return a Win32 thread.
50
51
TThreadImp
*
TWin32ThreadFactory::CreateThreadImp
()
52
{
53
return
new
TWin32Thread
;
54
}
55
56
////////////////////////////////////////////////////////////////////////////////
57
/// Return a Win32 condition variable.
58
59
TConditionImp
*
TWin32ThreadFactory::CreateConditionImp
(
TMutexImp
*
m
)
60
{
61
return
new
TWin32Condition
(m);
62
}
TWin32ThreadFactory.h
TWin32Thread.h
TWin32ThreadFactory::CreateThreadImp
virtual TThreadImp * CreateThreadImp()
Return a Win32 thread.
Definition:
TWin32ThreadFactory.cxx:51
TWin32ThreadFactory::CreateConditionImp
virtual TConditionImp * CreateConditionImp(TMutexImp *m)
Return a Win32 condition variable.
Definition:
TWin32ThreadFactory.cxx:59
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
gThreadFactory
R__EXTERN TThreadFactory * gThreadFactory
Definition:
TThreadFactory.h:47
TWin32Mutex.h
TWin32ThreadFactory::CreateMutexImp
virtual TMutexImp * CreateMutexImp(Bool_t recursive)
Return a Win32 Mutex.
Definition:
TWin32ThreadFactory.cxx:43
TWin32Mutex
Definition:
TWin32Mutex.h:34
TThreadFactory
Definition:
TThreadFactory.h:34
gWin32ThreadFactoryCreator
static TWin32ThreadFactory gWin32ThreadFactoryCreator
Definition:
TWin32ThreadFactory.cxx:27
m
TMarker * m
Definition:
textangle.C:8
TConditionImp
Definition:
TConditionImp.h:33
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:279
TWin32Thread
Definition:
TWin32Thread.h:32
TWin32ThreadFactory
Definition:
TWin32ThreadFactory.h:33
TMutexImp
Definition:
TMutexImp.h:33
TWin32Condition
Definition:
TWin32Condition.h:61
TThreadImp
Definition:
TThreadImp.h:34
TWin32Condition.h
name
char name[80]
Definition:
TGX11.cxx:109