Loading [MathJax]/extensions/tex2jax.js
ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
core
thread
inc
TMutex.h
Go to the documentation of this file.
1
// @(#)root/thread:$Id$
2
// Author: Fons Rademakers 26/06/97
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, 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_TMutex
13
#define ROOT_TMutex
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TMutex //
19
// //
20
// This class implements mutex locks. A mutex is a mutual exclusive //
21
// lock. The actual work is done via the TMutexImp class (either //
22
// TPosixMutex or TWin32Mutex). //
23
// //
24
//////////////////////////////////////////////////////////////////////////
25
26
#ifndef ROOT_TVirtualMutex
27
#include "
TVirtualMutex.h
"
28
#endif
29
#ifndef ROOT_TThread
30
#include "
TThread.h
"
31
#endif
32
#ifndef ROOT_TMutexImp
33
#include "
TMutexImp.h
"
34
#endif
35
36
37
class
TMutex
:
public
TVirtualMutex
{
38
39
friend
class
TCondition
;
40
friend
class
TThread
;
41
42
private
:
43
TMutexImp
*
fMutexImp
;
// pointer to mutex implementation
44
45
TMutex
(
const
TMutex
&);
// not implemented
46
TMutex
&
operator=
(
const
TMutex
&);
// not implemented
47
48
public
:
49
TMutex
(
Bool_t
recursive =
kFALSE
);
50
virtual
~TMutex
() {
delete
fMutexImp
; }
51
52
Int_t
Lock
();
53
Int_t
TryLock
();
54
Int_t
UnLock
();
55
Int_t
CleanUp
();
56
57
TVirtualMutex
*
Factory
(
Bool_t
recursive =
kFALSE
);
58
59
ClassDef
(
TMutex
,0)
// Mutex lock class
60
};
61
62
#endif
TMutex
Definition:
TMutex.h:37
TVirtualMutex
This class implements a mutex interface.
Definition:
TVirtualMutex.h:34
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
kFALSE
const Bool_t kFALSE
Definition:
Rtypes.h:92
TMutex::TMutex
TMutex(const TMutex &)
TMutex::UnLock
Int_t UnLock()
Unlock the mutex.
Definition:
TMutex.cxx:68
TMutexImp.h
TMutex::Factory
TVirtualMutex * Factory(Bool_t recursive=kFALSE)
Create mutex and return pointer to it.
Definition:
TMutex.cxx:87
TVirtualMutex.h
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TMutex::fMutexImp
TMutexImp * fMutexImp
Definition:
TMutex.h:43
TThread
Definition:
TThread.h:49
TThread.h
TMutex::~TMutex
virtual ~TMutex()
Definition:
TMutex.h:50
TMutex::CleanUp
Int_t CleanUp()
Clean up of mutex.
Definition:
TMutex.cxx:76
TMutex::TryLock
Int_t TryLock()
Try to lock mutex.
Definition:
TMutex.cxx:57
TMutex::operator=
TMutex & operator=(const TMutex &)
TCondition
Definition:
TCondition.h:36
TMutex::Lock
Int_t Lock()
Lock the mutex.
Definition:
TMutex.cxx:46
TMutexImp
Definition:
TMutexImp.h:33