annotate DEPENDENCIES/generic/include/boost/log/detail/fake_mutex.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /*
Chris@101 2 * Copyright Andrey Semashev 2007 - 2015.
Chris@16 3 * Distributed under the Boost Software License, Version 1.0.
Chris@16 4 * (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 5 * http://www.boost.org/LICENSE_1_0.txt)
Chris@16 6 */
Chris@16 7 /*!
Chris@16 8 * \file fake_mutex.hpp
Chris@16 9 * \author Andrey Semashev
Chris@16 10 * \date 31.07.2011
Chris@16 11 *
Chris@16 12 * \brief This header is the Boost.Log library implementation, see the library documentation
Chris@16 13 * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
Chris@16 14 */
Chris@16 15
Chris@16 16 #ifndef BOOST_LOG_DETAIL_FAKE_MUTEX_HPP_INCLUDED_
Chris@16 17 #define BOOST_LOG_DETAIL_FAKE_MUTEX_HPP_INCLUDED_
Chris@16 18
Chris@16 19 #include <boost/log/detail/config.hpp>
Chris@16 20 #include <boost/log/detail/header.hpp>
Chris@16 21
Chris@16 22 #ifdef BOOST_HAS_PRAGMA_ONCE
Chris@16 23 #pragma once
Chris@16 24 #endif
Chris@16 25
Chris@16 26 namespace boost {
Chris@16 27
Chris@16 28 BOOST_LOG_OPEN_NAMESPACE
Chris@16 29
Chris@16 30 namespace aux {
Chris@16 31
Chris@16 32 //! Fake mutex that doesn't do anything. Note: we're not using \c null_mutex from Boost.Thread in order not to introduce false dependencies on Boost.Thread and Boost.Chrono.
Chris@16 33 class fake_mutex
Chris@16 34 {
Chris@16 35 public:
Chris@16 36 BOOST_DEFAULTED_FUNCTION(fake_mutex(), {})
Chris@16 37 void lock() {}
Chris@16 38 bool try_lock() { return true; }
Chris@16 39 template< typename T >
Chris@16 40 bool timed_lock(T const&) { return true; }
Chris@16 41 void unlock() {}
Chris@16 42
Chris@16 43 // Copying prohibited
Chris@16 44 BOOST_DELETED_FUNCTION(fake_mutex(fake_mutex const&))
Chris@16 45 BOOST_DELETED_FUNCTION(fake_mutex& operator=(fake_mutex const&))
Chris@16 46 };
Chris@16 47
Chris@16 48 } // namespace aux
Chris@16 49
Chris@16 50 BOOST_LOG_CLOSE_NAMESPACE // namespace log
Chris@16 51
Chris@16 52 } // namespace boost
Chris@16 53
Chris@16 54 #include <boost/log/detail/footer.hpp>
Chris@16 55
Chris@16 56 #endif // BOOST_LOG_DETAIL_FAKE_MUTEX_HPP_INCLUDED_