Main Page
Namespaces
Classes
Files
File List
File Members
src
tools
Mutex.hpp
Go to the documentation of this file.
1
5
#ifndef MUTEX_HPP
6
#define MUTEX_HPP
7
8
#include "../BasicDatatypes.hpp"
9
#include <pthread.h>
10
11
12
13
//
14
// Mutex class
15
//
16
class
Mutex
17
{
18
public
:
19
Mutex
();
20
~Mutex
();
21
22
void
lock
();
23
void
unlock
();
24
25
private
:
26
pthread_mutex_t
m_mutex
;
27
};
28
29
30
31
//
32
// Scoped Lock.
33
// Zerstoert das Mutex automatisch.
34
//
35
class
ScopedLock
36
{
37
public
:
38
ScopedLock
(
Mutex
* mutexPtr);
39
~
ScopedLock
();
40
private
:
41
Mutex
*
m_mutexPtr
;
42
};
43
44
45
#endif // MUTEX_HPP
Mutex::m_mutex
pthread_mutex_t m_mutex
Definition:
Mutex.hpp:26
Mutex::Mutex
Mutex()
Definition:
Mutex.cpp:38
Mutex
Definition:
Mutex.hpp:16
Mutex::~Mutex
~Mutex()
Definition:
Mutex.cpp:43
ScopedLock
Definition:
Mutex.hpp:35
Mutex::unlock
void unlock()
Definition:
Mutex.cpp:52
ScopedLock::m_mutexPtr
Mutex * m_mutexPtr
Definition:
Mutex.hpp:41
Mutex::lock
void lock()
Definition:
Mutex.cpp:47
libsick_ldmrs
Author(s): SICK AG
, Martin Günther
, Jochen Sprickerhof
autogenerated on Sat Jun 8 2019 17:57:33