]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/detail/lightweight_mutex.hpp
Add forgotten test to distribution
[lyx.git] / boost / boost / detail / lightweight_mutex.hpp
index b92b576c9234f96360cf2db716cfe273ab20e960..b7a7f6dd4ed6139f1c18bf8d33e5a7e7020669e0 100644 (file)
@@ -1,73 +1,22 @@
 #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
 #define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
 
-#if _MSC_VER >= 1020
-#pragma once
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
 #endif
 
 //
 //  boost/detail/lightweight_mutex.hpp - lightweight mutex
 //
-//  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
-//
-//  Permission to copy, use, modify, sell and distribute this software
-//  is granted provided this copyright notice appears in all copies.
-//  This software is provided "as is" without express or implied
-//  warranty, and with no claim as to its suitability for any purpose.
-//
-//  typedef <implementation-defined> boost::detail::lightweight_mutex;
-//
-//  boost::detail::lightweight_mutex meets the Mutex concept requirements
-//  See http://www.boost.org/libs/thread/doc/mutex_concept.html#Mutex
-//
-//  * Used by the smart pointer library
-//  * Performance oriented
-//  * Header-only implementation
-//  * Small memory footprint
-//  * Not a general purpose mutex, use boost::mutex, CRITICAL_SECTION or
-//    pthread_mutex instead.
-//  * Never spin in a tight lock/do-something/unlock loop, since
-//    lightweight_mutex does not guarantee fairness.
-//  * Never keep a lightweight_mutex locked for long periods.
-//
-
-//  Note: lwm_linux.hpp has been disabled by default; see the comments
-//        inside for more info.
-
-
-#include <boost/config.hpp>
-
-//
-//  Note to implementors: if you write a platform-specific lightweight_mutex
-//  for a platform that supports pthreads, be sure to test its performance
-//  against the pthreads-based version using shared_ptr_timing_test.cpp and
-//  shared_ptr_mt_test.cpp. Custom versions are usually not worth the trouble
-//  _unless_ the performance gains are substantial.
+//  Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.
 //
-//  Be sure to compare against a "real" pthreads library;
-//  shared_ptr_timing_test.cpp will compile succesfully with a stub do-nothing
-//  pthreads library, since it doesn't create any threads.
+//  Distributed under the Boost Software License, Version 1.0.
+//  See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt
 //
 
-#ifndef BOOST_HAS_THREADS
-#  include <boost/detail/lwm_nop.hpp>
-#elif defined(BOOST_USE_ASM_ATOMIC_H)
-#  include <boost/detail/lwm_linux.hpp>
-#elif defined(BOOST_LWM_USE_CRITICAL_SECTION)
-#  include <boost/detail/lwm_win32_cs.hpp>
-#elif defined(BOOST_LWM_USE_PTHREADS)
-#  include <boost/detail/lwm_pthreads.hpp>
-#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
-#  include <boost/detail/lwm_win32.hpp>
-#elif defined(__sgi)
-#  include <boost/detail/lwm_irix.hpp>
-#elif defined(__GLIBCPP__)
-#  include <boost/detail/lwm_gcc.hpp>
-#elif defined(BOOST_HAS_PTHREADS)
-#  define BOOST_LWM_USE_PTHREADS
-#  include <boost/detail/lwm_pthreads.hpp>
-#else
-#  include <boost/detail/lwm_nop.hpp>
-#endif
+#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
 
 #endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED