Chris@16: // Copyright (C) 2000 Stephen Cleary Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org for updates, documentation, and revision history. Chris@16: Chris@16: #ifndef BOOST_POOL_MUTEX_HPP Chris@16: #define BOOST_POOL_MUTEX_HPP Chris@16: Chris@16: #include // for workarounds Chris@16: #ifdef BOOST_HAS_THREADS Chris@16: #include Chris@16: #endif Chris@16: Chris@16: namespace boost{ namespace details{ namespace pool{ Chris@16: Chris@16: class null_mutex Chris@16: { Chris@16: private: Chris@16: null_mutex(const null_mutex &); Chris@16: void operator=(const null_mutex &); Chris@16: Chris@16: public: Chris@16: null_mutex() { } Chris@16: Chris@16: static void lock() { } Chris@16: static void unlock() { } Chris@16: }; Chris@16: Chris@16: #if !defined(BOOST_HAS_THREADS) || defined(BOOST_NO_MT) || defined(BOOST_POOL_NO_MT) Chris@16: typedef null_mutex default_mutex; Chris@16: #else Chris@16: typedef boost::mutex default_mutex; Chris@16: #endif Chris@16: Chris@16: } // namespace pool Chris@16: } // namespace details Chris@16: } // namespace boost Chris@16: Chris@16: #endif