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