Realistic 3D camera system
3D camera system components
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
asio-1.10.6
include
asio
detail
std_mutex.hpp
Go to the documentation of this file.
1
//
2
// detail/std_mutex.hpp
3
// ~~~~~~~~~~~~~~~~~~~~
4
//
5
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6
//
7
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
//
10
11
#ifndef ASIO_DETAIL_STD_MUTEX_HPP
12
#define ASIO_DETAIL_STD_MUTEX_HPP
13
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15
# pragma once
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18
#include "
asio/detail/config.hpp
"
19
20
#if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
21
22
#include <mutex>
23
#include "
asio/detail/noncopyable.hpp
"
24
#include "
asio/detail/scoped_lock.hpp
"
25
26
#include "
asio/detail/push_options.hpp
"
27
28
namespace
asio
{
29
namespace
detail {
30
31
class
std_event;
32
33
class
std_mutex
34
:
private
noncopyable
35
{
36
public
:
37
typedef
asio::detail::scoped_lock<std_mutex>
scoped_lock;
38
39
// Constructor.
40
std_mutex()
41
{
42
}
43
44
// Destructor.
45
~std_mutex()
46
{
47
}
48
49
// Lock the mutex.
50
void
lock()
51
{
52
mutex_.
lock
();
53
}
54
55
// Unlock the mutex.
56
void
unlock()
57
{
58
mutex_.unlock();
59
}
60
61
private
:
62
friend
class
std_event;
63
std::mutex
mutex_;
64
};
65
66
}
// namespace detail
67
}
// namespace asio
68
69
#include "
asio/detail/pop_options.hpp
"
70
71
#endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
72
73
#endif // ASIO_DETAIL_STD_MUTEX_HPP
asio::detail::scoped_lock
Definition:
scoped_lock.hpp:27
asio::detail::mutex
null_mutex mutex
Definition:
mutex.hpp:36
config.hpp
push_options.hpp
scoped_lock.hpp
asio::detail::scoped_lock::lock
void lock()
Definition:
scoped_lock.hpp:57
pop_options.hpp
noncopyable.hpp
asio
Definition:
async_result.hpp:23
Generated by
1.8.11