forked from boostorg/smart_ptr
Disabled the linux-specific versions since using kernel headers is problematic. #define BOOST_USE_ASM_ATOMIC_H to get them back.
[SVN r12995]
This commit is contained in:
@ -72,6 +72,8 @@
|
|||||||
// are called driven by smart_ptr interface...
|
// are called driven by smart_ptr interface...
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// Note: atomic_count_linux.hpp has been disabled by default; see the
|
||||||
|
// comments inside for more info.
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
@ -90,17 +92,12 @@ typedef long atomic_count;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||||
|
# include <boost/detail/atomic_count_win32.hpp>
|
||||||
#include <boost/detail/atomic_count_win32.hpp>
|
//#elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||||
|
#elif defined(BOOST_USE_ASM_ATOMIC_H)
|
||||||
#elif defined(linux) || defined(__linux) || defined(__linux__)
|
# include <boost/detail/atomic_count_linux.hpp>
|
||||||
|
|
||||||
#include <boost/detail/atomic_count_linux.hpp>
|
|
||||||
|
|
||||||
#elif defined(BOOST_HAS_PTHREADS)
|
#elif defined(BOOST_HAS_PTHREADS)
|
||||||
|
# include <boost/detail/atomic_count_pthreads.hpp>
|
||||||
#include <boost/detail/atomic_count_pthreads.hpp>
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// #warning Unrecognized platform, detail::atomic_count will not be thread safe
|
// #warning Unrecognized platform, detail::atomic_count will not be thread safe
|
||||||
|
@ -13,7 +13,13 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
// On Linux, atomic.h is usually located in /usr/include/asm
|
// This implementation uses <asm/atomic.h>. This is a kernel header;
|
||||||
|
// using kernel headers in a user program may cause a number of problems,
|
||||||
|
// and not all flavors of Linux provide the atomic instructions.
|
||||||
|
//
|
||||||
|
// This file is only provided because the performance of this implementation
|
||||||
|
// is significantly higher than the pthreads version. Use at your own risk
|
||||||
|
// (by defining BOOST_USE_ASM_ATOMIC_H.)
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
// * Never keep a lightweight_mutex locked for long periods.
|
// * 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>
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
@ -38,7 +41,8 @@
|
|||||||
# include <boost/detail/lwm_nop.hpp>
|
# include <boost/detail/lwm_nop.hpp>
|
||||||
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||||
# include <boost/detail/lwm_win32.hpp>
|
# include <boost/detail/lwm_win32.hpp>
|
||||||
#elif defined(linux) || defined(__linux) || defined(__linux__)
|
//#elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||||
|
#elif defined(BOOST_USE_ASM_ATOMIC_H)
|
||||||
# include <boost/detail/lwm_linux.hpp>
|
# include <boost/detail/lwm_linux.hpp>
|
||||||
#elif defined(__sgi)
|
#elif defined(__sgi)
|
||||||
# include <boost/detail/lwm_irix.hpp>
|
# include <boost/detail/lwm_irix.hpp>
|
||||||
|
@ -16,6 +16,16 @@
|
|||||||
// warranty, and with no claim as to its suitability for any purpose.
|
// warranty, and with no claim as to its suitability for any purpose.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// This implementation uses <asm/atomic.h>. This is a kernel header;
|
||||||
|
// using kernel headers in a user program may cause a number of problems,
|
||||||
|
// and not all flavors of Linux provide the atomic instructions.
|
||||||
|
//
|
||||||
|
// This file is only provided because the performance of this implementation
|
||||||
|
// is about 3.5 times higher than the pthreads version. Use at your own risk
|
||||||
|
// (by defining BOOST_USE_ASM_ATOMIC_H.)
|
||||||
|
//
|
||||||
|
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user