Belle II Software
release-05-02-19
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
h
i
l
m
n
p
r
s
t
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
LockGuard.h
1
#ifndef _Belle2_LockGuard_hh
2
#define _Belle2_LockGuard_hh
3
4
#include <daq/slc/system/Mutex.h>
5
#include "MMutex.h"
6
7
namespace
Belle2
{
39
template
<
class
AMutex>
40
class
GenericLockGuard
{
41
public
:
43
explicit
GenericLockGuard
(AMutex& mutex) :
m_mutex
(mutex)
44
{
45
m_mutex
.lock();
46
}
47
49
~GenericLockGuard
()
50
{
51
m_mutex
.unlock();
52
}
53
54
private
:
56
GenericLockGuard
(
const
GenericLockGuard
&);
57
59
GenericLockGuard
&
operator=
(
const
GenericLockGuard
&);
60
62
AMutex&
m_mutex
;
63
};
64
65
typedef
GenericLockGuard<Mutex>
LockGuard
;
66
typedef
GenericLockGuard<MMutex>
MLockGuard
;
68
}
69
70
#endif
Belle2::GenericLockGuard::~GenericLockGuard
~GenericLockGuard()
Automatically release the lock on destruction.
Definition:
LockGuard.h:49
Belle2::GenericLockGuard::GenericLockGuard
GenericLockGuard(AMutex &mutex)
Construct a new LockGuard locking the mutex.
Definition:
LockGuard.h:43
Belle2::GenericLockGuard
Lock Guard for a Mutex instance.
Definition:
LockGuard.h:40
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::GenericLockGuard::m_mutex
AMutex & m_mutex
The mutex hold by this lock guard.
Definition:
LockGuard.h:62
Belle2::GenericLockGuard::operator=
GenericLockGuard & operator=(const GenericLockGuard &)
Do not allow to copy a lock guard.
daq
slc
system
include
LockGuard.h
Generated on Tue Jan 4 2022 02:54:36 for Belle II Software by
1.8.17