BIND 10 trac1680, updated. a2a9e24d6a5744ab6b916c8e94ab0b77137417f2 [1680] remove codes which should be build in --enable-boost-threads switch. the codes are in src/lib/util/locks.h

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Mar 6 01:10:53 UTC 2012


The branch, trac1680 has been updated
       via  a2a9e24d6a5744ab6b916c8e94ab0b77137417f2 (commit)
      from  9c4d0cadf4adc802cc41a2610dc2c30b25aad728 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a2a9e24d6a5744ab6b916c8e94ab0b77137417f2
Author: haikuo zhang <zhanghaikuo at cnnic.cn>
Date:   Mon Mar 5 18:11:49 2012 +0800

    [1680] remove codes which should be build in --enable-boost-threads
    switch. the codes are in src/lib/util/locks.h

-----------------------------------------------------------------------

Summary of changes:
 src/lib/util/locks.h |   58 +------------------------------------------------
 1 files changed, 2 insertions(+), 56 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/util/locks.h b/src/lib/util/locks.h
index 971c413..daaf216 100644
--- a/src/lib/util/locks.h
+++ b/src/lib/util/locks.h
@@ -15,13 +15,9 @@
 /// This file (right now) provides dummy locks
 /// It also contains code to use boost/threads locks:
 ///
-/// if USE_BOOST_THREADS is defined, we typedef the relevant classes
-/// and derive from the relevant templates so our dummy locks are
-/// replaced by the boost locks (--enable-boost-threads)
 ///
-/// If USE_BOOST_THREADS is NOT defined, all locks are dummy classes
-/// that don't actually do anything. At this moment, only the very
-/// minimal set of methods that we actually use is defined.
+/// All locks are dummy classes that don't actually do anything. At this moment, 
+/// only the very minimal set of methods that we actually use is defined.
 ///
 /// Note that we need to include <config.h> in our .cc files for that
 /// to be set. we might want to enfore this at compile time with a check
@@ -30,8 +26,6 @@
 #ifndef __LOCKS_
 #define __LOCKS_
 
-#ifndef USE_BOOST_THREADS
-
 namespace isc {
 namespace util {
 namespace locks {
@@ -64,52 +58,4 @@ public:
 } // namespace util
 } // namespace isc
 
-#else // USE_BOOST_THREADS
-
-// Workaround for a problem with boost and sunstudio 5.10
-// There is a version check in there that appears wrong,
-// which makes including boost/thread.hpp fail
-// This will probably be fixed in a future version of boost,
-// in which case this part can be removed then
-#ifdef NEED_SUNPRO_WORKAROUND
-#if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100
-#undef __SUNPRO_CC
-#define __SUNPRO_CC 0x5090
-#endif
-#endif // NEED_SUNPRO_WORKAROUND
-
-#include <boost/thread.hpp>
-#include <boost/interprocess/sync/sharable_lock.hpp>
-#include <boost/interprocess/sync/scoped_lock.hpp>
-#include <boost/interprocess/sync/interprocess_upgradable_mutex.hpp>
-#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
-
-namespace isc {
-namespace util {
-namespace locks {
-
-typedef boost::mutex mutex;
-typedef boost::interprocess::interprocess_upgradable_mutex upgradable_mutex;
-typedef boost::interprocess::interprocess_recursive_mutex recursive_mutex;
-
-template <typename T>
-struct sharable_lock : public boost::interprocess::sharable_lock<T> {
-public:
-    sharable_lock(T&  mtype) : boost::interprocess::sharable_lock<T>(mtype) {}
-};
-
-
-template <class T>
-struct scoped_lock : public boost::interprocess::scoped_lock<T> {
-public:
-    scoped_lock(T& mtype) : boost::interprocess::scoped_lock<T>(mtype) { }
-};
-
-} // namespace locks
-} // namespace util
-} // namespace isc
-
-
-#endif // USE_BOOST_THREADS
-
 #endif // __LOCKS_



More information about the bind10-changes mailing list