Boost logo

Boost-Commit :

From: pdimov_at_[hidden]
Date: 2008-04-13 11:35:40


Author: pdimov
Date: 2008-04-13 11:35:40 EDT (Sun, 13 Apr 2008)
New Revision: 44369
URL: http://svn.boost.org/trac/boost/changeset/44369

Log:
Honor BOOST_DISABLE_THREADS; route GCC/ARM to the spinlock implementation; fall back to the spinlock implementation instead of using pthread_mutex.
Text files modified:
   trunk/boost/detail/sp_counted_base.hpp | 30 +++++++-----------------------
   1 files changed, 7 insertions(+), 23 deletions(-)

Modified: trunk/boost/detail/sp_counted_base.hpp
==============================================================================
--- trunk/boost/detail/sp_counted_base.hpp (original)
+++ trunk/boost/detail/sp_counted_base.hpp 2008-04-13 11:35:40 EDT (Sun, 13 Apr 2008)
@@ -20,65 +20,49 @@
 #include <boost/config.hpp>
 
 #if defined( BOOST_SP_DISABLE_THREADS )
-
 # include <boost/detail/sp_counted_base_nt.hpp>
 
 #elif defined( BOOST_SP_USE_SPINLOCK )
-
 # include <boost/detail/sp_counted_base_spin.hpp>
 
 #elif defined( BOOST_SP_USE_PTHREADS )
-
 # include <boost/detail/sp_counted_base_pt.hpp>
 
-#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
+#elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
+# include <boost/detail/sp_counted_base_nt.hpp>
 
+#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
 # include <boost/detail/sp_counted_base_gcc_x86.hpp>
 
-//~ #elif defined( __MWERKS__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
-
-//~ # include <boost/detail/sp_counted_base_cw_x86.hpp>
-
 #elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER )
-
 # include <boost/detail/sp_counted_base_gcc_ia64.hpp>
 
 #elif defined(__HP_aCC) && defined(__ia64)
-
 # include <boost/detail/sp_counted_base_acc_ia64.hpp>
 
 #elif defined( __MWERKS__ ) && defined( __POWERPC__ )
-
 # include <boost/detail/sp_counted_base_cw_ppc.hpp>
 
 #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) )
-
 # include <boost/detail/sp_counted_base_gcc_ppc.hpp>
 
-#elif defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
+#elif defined(__GNUC__) && defined( __arm__ )
+# include <boost/detail/sp_counted_base_spin.hpp>
 
+#elif defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
 # include <boost/detail/sp_counted_base_sync.hpp>
 
 #elif defined(__GNUC__) && ( defined( __sparcv8 ) || defined( __sparcv9 ) )
-
 # include <boost/detail/sp_counted_base_gcc_sparc.hpp>
 
 #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-
 # include <boost/detail/sp_counted_base_w32.hpp>
 
 #elif !defined( BOOST_HAS_THREADS )
-
 # include <boost/detail/sp_counted_base_nt.hpp>
 
-#elif defined( BOOST_HAS_PTHREADS )
-
-# include <boost/detail/sp_counted_base_pt.hpp>
-
 #else
-
-// Use #define BOOST_DISABLE_THREADS to avoid the error
-# error Unrecognized threading platform
+# include <boost/detail/sp_counted_base_spin.hpp>
 
 #endif
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk