Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
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
y
Variables
_
a
b
i
k
n
p
r
s
t
v
Typedefs
a
b
c
f
h
i
m
n
p
s
t
u
w
y
Enumerations
Enumerator
a
b
c
e
f
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
Enumerator
a
b
c
e
g
i
k
l
m
n
o
p
r
s
u
v
Related Functions
a
b
c
d
e
i
l
m
o
r
s
u
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
g
m
o
p
r
s
t
Variables
_
a
b
f
g
l
t
u
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
e
f
g
i
l
m
r
s
u
v
w
x
sick_visionary_cpp_shared
3pp
boost
smart_ptr
detail
lwm_pthreads.hpp
Go to the documentation of this file.
1
#ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED
2
#define BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED
3
4
// MS compatible compilers support #pragma once
5
6
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
7
# pragma once
8
#endif
9
10
//
11
// boost/detail/lwm_pthreads.hpp
12
//
13
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
14
//
15
// Distributed under the Boost Software License, Version 1.0. (See
16
// accompanying file LICENSE_1_0.txt or copy at
17
// http://www.boost.org/LICENSE_1_0.txt)
18
//
19
20
#include <
boost/assert.hpp
>
21
#include <pthread.h>
22
23
namespace
boost
24
{
25
26
namespace
detail
27
{
28
29
class
lightweight_mutex
30
{
31
private
:
32
33
pthread_mutex_t
m_
;
34
35
lightweight_mutex
(
lightweight_mutex
const
&);
36
lightweight_mutex
&
operator=
(
lightweight_mutex
const
&);
37
38
public
:
39
40
lightweight_mutex
()
41
{
42
43
// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
44
45
#if defined(__hpux) && defined(_DECTHREADS_)
46
BOOST_VERIFY
( pthread_mutex_init( &
m_
, pthread_mutexattr_default ) == 0 );
47
#else
48
BOOST_VERIFY
( pthread_mutex_init( &
m_
, 0 ) == 0 );
49
#endif
50
}
51
52
~lightweight_mutex
()
53
{
54
BOOST_VERIFY
( pthread_mutex_destroy( &
m_
) == 0 );
55
}
56
57
class
scoped_lock
;
58
friend
class
scoped_lock
;
59
60
class
scoped_lock
61
{
62
private
:
63
64
pthread_mutex_t &
m_
;
65
66
scoped_lock
(
scoped_lock
const
&);
67
scoped_lock
&
operator=
(
scoped_lock
const
&);
68
69
public
:
70
71
scoped_lock
(
lightweight_mutex
& m):
m_
(m.
m_
)
72
{
73
BOOST_VERIFY
( pthread_mutex_lock( &
m_
) == 0 );
74
}
75
76
~scoped_lock
()
77
{
78
BOOST_VERIFY
( pthread_mutex_unlock( &
m_
) == 0 );
79
}
80
};
81
};
82
83
}
// namespace detail
84
85
}
// namespace boost
86
87
#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED
boost::detail::lightweight_mutex::~lightweight_mutex
~lightweight_mutex()
Definition:
lwm_pthreads.hpp:52
boost::detail::lightweight_mutex::scoped_lock::operator=
scoped_lock & operator=(scoped_lock const &)
boost::detail::lightweight_mutex::scoped_lock::m_
pthread_mutex_t & m_
Definition:
lwm_pthreads.hpp:64
boost::detail::lightweight_mutex::scoped_lock::scoped_lock
scoped_lock(lightweight_mutex &m)
Definition:
lwm_pthreads.hpp:71
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::detail::lightweight_mutex::operator=
lightweight_mutex & operator=(lightweight_mutex const &)
BOOST_VERIFY
#define BOOST_VERIFY(expr)
Definition:
assert.hpp:82
boost::detail::lightweight_mutex::scoped_lock::~scoped_lock
~scoped_lock()
Definition:
lwm_pthreads.hpp:76
boost::detail::lightweight_mutex::scoped_lock::scoped_lock
scoped_lock(scoped_lock const &)
assert.hpp
boost::detail::lightweight_mutex::m_
pthread_mutex_t m_
Definition:
lwm_pthreads.hpp:33
boost::detail::lightweight_mutex
Definition:
lwm_nop.hpp:26
boost::detail::lightweight_mutex::scoped_lock
Definition:
lwm_pthreads.hpp:60
boost::detail::lightweight_mutex::lightweight_mutex
lightweight_mutex()
Definition:
lwm_pthreads.hpp:40
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:43:36