Main Page
Related Pages
Namespaces
Namespace List
Namespace 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
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
w
x
y
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
Enumerations
Enumerator
a
c
d
e
f
i
l
m
n
o
r
t
u
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
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
i
l
m
n
o
p
q
r
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Variables
_
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Typedefs
b
c
f
h
i
l
p
r
s
t
u
Enumerations
Enumerator
c
d
e
i
o
p
r
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
driver
src
tcp
Mutex.cpp
Go to the documentation of this file.
1
5
#include "
sick_scan/tcp/Mutex.hpp
"
6
#include "
sick_scan/tcp/errorhandler.hpp
"
7
8
// ****************************************************************************
9
// ScopedLock
10
// ****************************************************************************
11
12
// Konstruktor.
13
// Lock sperren.
14
ScopedLock::ScopedLock
(
Mutex
* mutexPtr)
15
{
16
m_mutexPtr
= mutexPtr;
17
if
(
m_mutexPtr
!=
NULL
)
18
{
19
m_mutexPtr
->
lock
();
20
}
21
}
22
23
// Destruktor.
24
// Lock wieder freigeben.
25
ScopedLock::~ScopedLock
()
26
{
27
if
(
m_mutexPtr
!=
NULL
)
28
{
29
m_mutexPtr
->
unlock
();
30
}
31
}
32
33
34
35
// ****************************************************************************
36
// Mutex
37
// ****************************************************************************
38
Mutex::Mutex
()
39
{
40
//pthread_mutex_init (&m_mutex, NULL);
41
}
42
43
Mutex::~Mutex
()
44
{
45
}
46
47
void
Mutex::lock
()
48
{
49
m_mutex
.lock();
50
//pthread_mutex_lock(&m_mutex);
51
}
52
53
void
Mutex::unlock
()
54
{
55
m_mutex
.unlock();
56
// pthread_mutex_unlock(&m_mutex);
57
}
NULL
#define NULL
errorhandler.hpp
Mutex::lock
void lock()
Definition:
Mutex.cpp:47
ScopedLock::ScopedLock
ScopedLock(Mutex *mutexPtr)
Definition:
Mutex.cpp:14
Mutex::~Mutex
~Mutex()
Definition:
Mutex.cpp:43
ScopedLock::~ScopedLock
~ScopedLock()
Definition:
Mutex.cpp:25
Mutex.hpp
Mutex
Definition:
Mutex.hpp:19
Mutex::Mutex
Mutex()
Definition:
Mutex.cpp:38
ScopedLock::m_mutexPtr
Mutex * m_mutexPtr
Definition:
Mutex.hpp:45
Mutex::m_mutex
std::mutex m_mutex
Definition:
Mutex.hpp:29
Mutex::unlock
void unlock()
Definition:
Mutex.cpp:53
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof
, Martin Günther
autogenerated on Fri Oct 25 2024 02:47:09