Belle II Software
release-05-01-25
Mutex.cc
1
#include "daq/slc/system/Mutex.h"
2
3
using namespace
Belle2
;
4
5
Mutex::Mutex()
6
{
7
pthread_mutexattr_init(&m_attr);
8
pthread_mutex_init(&m_mu, &m_attr);
9
}
10
11
Mutex::~Mutex()
12
{
13
}
14
15
bool
Mutex::lock()
16
{
17
if
(pthread_mutex_lock(&m_mu) != 0) {
18
return
false
;
19
}
20
return
true
;
21
}
22
23
bool
Mutex::unlock()
24
{
25
if
(pthread_mutex_unlock(&m_mu) != 0) {
26
return
false
;
27
}
28
return
true
;
29
}
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
daq
slc
system
src
Mutex.cc
Generated on Fri Nov 5 2021 03:50:17 for Belle II Software by
1.8.17