Logo ROOT   6.10/09
Reference Guide
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).
28 
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 
44 {
45  return new TWin32Mutex(recursive);
46 }
47 
48 ////////////////////////////////////////////////////////////////////////////////
49 /// Return a Win32 thread.
50 
52 {
53  return new TWin32Thread;
54 }
55 
56 ////////////////////////////////////////////////////////////////////////////////
57 /// Return a Win32 condition variable.
58 
60 {
61  return new TWin32Condition(m);
62 }
virtual TThreadImp * CreateThreadImp()
Return a Win32 thread.
virtual TConditionImp * CreateConditionImp(TMutexImp *m)
Return a Win32 condition variable.
bool Bool_t
Definition: RtypesCore.h:59
R__EXTERN TThreadFactory * gThreadFactory
virtual TMutexImp * CreateMutexImp(Bool_t recursive)
Return a Win32 Mutex.
static TWin32ThreadFactory gWin32ThreadFactoryCreator
TMarker * m
Definition: textangle.C:8
#define ClassImp(name)
Definition: Rtypes.h:336