Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63776 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2010-07-09 09:43:07


Author: chris_kohlhoff
Date: 2010-07-09 09:43:05 EDT (Fri, 09 Jul 2010)
New Revision: 63776
URL: http://svn.boost.org/trac/boost/changeset/63776

Log:
Fence class for hppa.

Added:
   trunk/boost/asio/detail/gcc_hppa_fenced_block.hpp (contents, props changed)
   trunk/boost/asio/detail/gcc_sync_fenced_block.hpp (contents, props changed)
Removed:
   trunk/boost/asio/detail/gcc_fenced_block.hpp
Text files modified:
   trunk/boost/asio/detail/fenced_block.hpp | 24 ++++++++++++------------
   1 files changed, 12 insertions(+), 12 deletions(-)

Modified: trunk/boost/asio/detail/fenced_block.hpp
==============================================================================
--- trunk/boost/asio/detail/fenced_block.hpp (original)
+++ trunk/boost/asio/detail/fenced_block.hpp 2010-07-09 09:43:05 EDT (Fri, 09 Jul 2010)
@@ -23,17 +23,17 @@
 # include <boost/asio/detail/macos_fenced_block.hpp>
 #elif defined(__sun)
 # include <boost/asio/detail/solaris_fenced_block.hpp>
+#elif defined(__GNUC__) && defined(__arm__)
+# include <boost/asio/detail/gcc_arm_fenced_block.hpp>
+#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+# include <boost/asio/detail/gcc_hppa_fenced_block.hpp>
 #elif defined(__GNUC__) \
   && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
   && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) \
- && (!defined(__arm__) || (defined(__arm__) && \
- (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || (__GNUC__ > 4)))
-# include <boost/asio/detail/gcc_fenced_block.hpp>
+ && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+# include <boost/asio/detail/gcc_sync_fenced_block.hpp>
 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 # include <boost/asio/detail/gcc_x86_fenced_block.hpp>
-#elif defined(__GNUC__) && defined(__arm__)
-# include <boost/asio/detail/gcc_arm_fenced_block.hpp>
 #elif defined(BOOST_WINDOWS) && !defined(UNDER_CE)
 # include <boost/asio/detail/win_fenced_block.hpp>
 #else
@@ -50,17 +50,17 @@
 typedef macos_fenced_block fenced_block;
 #elif defined(__sun)
 typedef solaris_fenced_block fenced_block;
+#elif defined(__GNUC__) && defined(__arm__)
+typedef gcc_arm_fenced_block fenced_block;
+#elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+typedef gcc_hppa_fenced_block fenced_block;
 #elif defined(__GNUC__) \
   && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
   && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) \
- && (!defined(__arm__) || (defined(__arm__) && \
- (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || (__GNUC__ > 4)))
-typedef gcc_fenced_block fenced_block;
+ && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+typedef gcc_sync_fenced_block fenced_block;
 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 typedef gcc_x86_fenced_block fenced_block;
-#elif defined(__GNUC__) && defined(__arm__)
-typedef gcc_arm_fenced_block fenced_block;
 #elif defined(BOOST_WINDOWS) && !defined(UNDER_CE)
 typedef win_fenced_block fenced_block;
 #else

Deleted: trunk/boost/asio/detail/gcc_fenced_block.hpp
==============================================================================
--- trunk/boost/asio/detail/gcc_fenced_block.hpp 2010-07-09 09:43:05 EDT (Fri, 09 Jul 2010)
+++ (empty file)
@@ -1,67 +0,0 @@
-//
-// detail/gcc_fenced_block.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// 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_ASIO_DETAIL_GCC_FENCED_BLOCK_HPP
-#define BOOST_ASIO_DETAIL_GCC_FENCED_BLOCK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
- && !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) \
- && (!defined(__arm__) || (defined(__arm__) && \
- (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || (__GNUC__ > 4)))
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-class gcc_fenced_block
- : private noncopyable
-{
-public:
- // Constructor.
- gcc_fenced_block()
- : value_(0)
- {
- __sync_lock_test_and_set(&value_, 1);
- }
-
- // Destructor.
- ~gcc_fenced_block()
- {
- __sync_lock_release(&value_);
- }
-
-private:
- int value_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(__GNUC__)
- // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
- // && !defined(__INTEL_COMPILER) && !defined(__ICL)
- // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
- // && (!defined(__arm__) || (defined(__arm__) &&
- // (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || (__GNUC__ > 4)))
-
-#endif // BOOST_ASIO_DETAIL_GCC_FENCED_BLOCK_HPP

Added: trunk/boost/asio/detail/gcc_hppa_fenced_block.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/asio/detail/gcc_hppa_fenced_block.hpp 2010-07-09 09:43:05 EDT (Fri, 09 Jul 2010)
@@ -0,0 +1,59 @@
+//
+// detail/gcc_hppa_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class gcc_hppa_fenced_block
+ : private noncopyable
+{
+public:
+ // Constructor.
+ gcc_hppa_fenced_block()
+ {
+ barrier();
+ }
+
+ // Destructor.
+ ~gcc_hppa_fenced_block()
+ {
+ barrier();
+ }
+
+private:
+ static void barrier()
+ {
+ __asm__ __volatile__ ("" : : : "memory");
+ }
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
+
+#endif // BOOST_ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP

Added: trunk/boost/asio/detail/gcc_sync_fenced_block.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/asio/detail/gcc_sync_fenced_block.hpp 2010-07-09 09:43:05 EDT (Fri, 09 Jul 2010)
@@ -0,0 +1,63 @@
+//
+// detail/gcc_sync_fenced_block.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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_ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
+#define BOOST_ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(__GNUC__) \
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
+ && !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+class gcc_sync_fenced_block
+ : private noncopyable
+{
+public:
+ // Constructor.
+ gcc_sync_fenced_block()
+ : value_(0)
+ {
+ __sync_lock_test_and_set(&value_, 1);
+ }
+
+ // Destructor.
+ ~gcc_sync_fenced_block()
+ {
+ __sync_lock_release(&value_);
+ }
+
+private:
+ int value_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(__GNUC__)
+ // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
+ // && !defined(__INTEL_COMPILER) && !defined(__ICL)
+ // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
+
+#endif // BOOST_ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP


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