Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / asio / detail / null_mutex.hpp @ 2486

History | View | Annotate | Download (1.2 kB)

1
//
2
// detail/null_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 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

    
27
namespace boost {
28
namespace asio {
29
namespace detail {
30

    
31
class null_mutex
32
  : private noncopyable
33
{
34
public:
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