null_mutex.hpp
Go to the documentation of this file.
00001 //
00002 // null_mutex.hpp
00003 // ~~~~~~~~~~~~~~
00004 //
00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00009 //
00010 
00011 #ifndef ASIO_DETAIL_NULL_MUTEX_HPP
00012 #define ASIO_DETAIL_NULL_MUTEX_HPP
00013 
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017 
00018 #include "asio/detail/push_options.hpp"
00019 
00020 #include "asio/detail/push_options.hpp"
00021 #include <boost/config.hpp>
00022 #include "asio/detail/pop_options.hpp"
00023 
00024 #if !defined(BOOST_HAS_THREADS)
00025 
00026 #include "asio/detail/noncopyable.hpp"
00027 #include "asio/detail/scoped_lock.hpp"
00028 
00029 namespace asio {
00030 namespace detail {
00031 
00032 class null_mutex
00033   : private noncopyable
00034 {
00035 public:
00036   typedef asio::detail::scoped_lock<null_mutex> scoped_lock;
00037 
00038   // Constructor.
00039   null_mutex()
00040   {
00041   }
00042 
00043   // Destructor.
00044   ~null_mutex()
00045   {
00046   }
00047 
00048   // Lock the mutex.
00049   void lock()
00050   {
00051   }
00052 
00053   // Unlock the mutex.
00054   void unlock()
00055   {
00056   }
00057 };
00058 
00059 } // namespace detail
00060 } // namespace asio
00061 
00062 #endif // !defined(BOOST_HAS_THREADS)
00063 
00064 #include "asio/detail/pop_options.hpp"
00065 
00066 #endif // ASIO_DETAIL_NULL_MUTEX_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:39