]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/asio/detail/null_mutex.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / asio / detail / null_mutex.hpp
CommitLineData
7c673cae
FG
1//
2// detail/null_mutex.hpp
3// ~~~~~~~~~~~~~~~~~~~~~
4//
92f5a8d4 5// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7c673cae
FG
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 BOOST_ASIO_DETAIL_NULL_MUTEX_HPP
12#define BOOST_ASIO_DETAIL_NULL_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 <boost/asio/detail/config.hpp>
19
20#if !defined(BOOST_ASIO_HAS_THREADS)
21
22#include <boost/asio/detail/noncopyable.hpp>
23#include <boost/asio/detail/scoped_lock.hpp>
24
25#include <boost/asio/detail/push_options.hpp>
26
27namespace boost {
28namespace asio {
29namespace detail {
30
31class null_mutex
32 : private noncopyable
33{
34public:
35 typedef boost::asio::detail::scoped_lock<null_mutex> scoped_lock;
36
37 // Constructor.
38 null_mutex()
39 {
40 }
41
42 // Destructor.
43 ~null_mutex()
44 {
45 }
46
47 // Lock the mutex.
48 void lock()
49 {
50 }
51
52 // Unlock the mutex.
53 void unlock()
54 {
55 }
56};
57
58} // namespace detail
59} // namespace asio
60} // namespace boost
61
62#include <boost/asio/detail/pop_options.hpp>
63
64#endif // !defined(BOOST_ASIO_HAS_THREADS)
65
66#endif // BOOST_ASIO_DETAIL_NULL_MUTEX_HPP