commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/03: pmt: Removing support for boost < 1.


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/03: pmt: Removing support for boost < 1.53 in ~pmt_t
Date: Wed, 14 Dec 2016 00:35:45 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch next
in repository gnuradio.

commit dcf8928e61d1c3a50391dc077b804bd0e6e1e403
Author: Darek Kawamoto <address@hidden>
Date:   Wed Dec 7 19:19:03 2016 -0500

    pmt: Removing support for boost < 1.53 in ~pmt_t
---
 gnuradio-runtime/lib/pmt/pmt.cc    |  8 --------
 gnuradio-runtime/lib/pmt/pmt_int.h | 21 +--------------------
 2 files changed, 1 insertion(+), 28 deletions(-)

diff --git a/gnuradio-runtime/lib/pmt/pmt.cc b/gnuradio-runtime/lib/pmt/pmt.cc
index 3b92481..da2a7e5 100644
--- a/gnuradio-runtime/lib/pmt/pmt.cc
+++ b/gnuradio-runtime/lib/pmt/pmt.cc
@@ -63,7 +63,6 @@ pmt_base::operator delete(void *p, size_t size)
 
 #endif
 
-#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
 void intrusive_ptr_add_ref(pmt_base* p)
 {
   p->refcount_.fetch_add(1, boost::memory_order_relaxed);
@@ -75,13 +74,6 @@ void intrusive_ptr_release(pmt_base* p) {
     delete p;
   }
 }
-#else
-// boost::atomic not available before 1.53
-// This section will be removed when support for boost 1.48 ceases
-// NB: This code is prone to segfault on non-Intel architectures.
-void intrusive_ptr_add_ref(pmt_base* p) { ++(p->count_); }
-void intrusive_ptr_release(pmt_base* p) { if (--(p->count_) == 0 ) delete p; }
-#endif
  
 pmt_base::~pmt_base()
 {
diff --git a/gnuradio-runtime/lib/pmt/pmt_int.h 
b/gnuradio-runtime/lib/pmt/pmt_int.h
index da48a0d..f06f507 100644
--- a/gnuradio-runtime/lib/pmt/pmt_int.h
+++ b/gnuradio-runtime/lib/pmt/pmt_int.h
@@ -25,13 +25,7 @@
 #include <pmt/pmt.h>
 #include <boost/utility.hpp>
 #include <boost/version.hpp>
-#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
-  #include <boost/atomic.hpp>
-#else
-  // boost::atomic not available before 1.53
-  // This section will be removed when support for boost 1.48 ceases
-  #include <boost/detail/atomic_count.hpp>
-#endif
+#include <boost/atomic.hpp>
 
 /*
  * EVERYTHING IN THIS FILE IS PRIVATE TO THE IMPLEMENTATION!
@@ -43,23 +37,10 @@
 namespace pmt {
 
 class PMT_API pmt_base : boost::noncopyable {
-
-#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
   mutable boost::atomic<int> refcount_;
-#else
-  // boost::atomic not available before 1.53
-  // This section will be removed when support for boost 1.48 ceases
-  mutable boost::detail::atomic_count count_;
-#endif
 
 protected:
-#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
   pmt_base() : refcount_(0) {};
-#else
-  // boost::atomic not available before 1.53
-  // This section will be removed when support for boost 1.48 ceases
-  pmt_base() : count_(0) {};
-#endif
   virtual ~pmt_base();
 
 public:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]