PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/asio/detail/null_mutex.hpp

http://hadesmem.googlecode.com/
C++ Header | 66 lines | 37 code | 16 blank | 13 comment | 2 complexity | 0f62428ddb8de704fc90356e00b088b4 MD5 | raw file
 1//
 2// detail/null_mutex.hpp
 3// ~~~~~~~~~~~~~~~~~~~~~
 4//
 5// Copyright (c) 2003-2011 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_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_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_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS)
65
66#endif // BOOST_ASIO_DETAIL_NULL_MUTEX_HPP