Commit f0dd8824 authored by Stephen Morris's avatar Stephen Morris

Merge branch 'master' into trac499

parents af01e66f bb708b65
...@@ -66,6 +66,11 @@ if test $enable_shared = no; then ...@@ -66,6 +66,11 @@ if test $enable_shared = no; then
AC_MSG_ERROR([BIND 10 requires shared libraries to be built]) AC_MSG_ERROR([BIND 10 requires shared libraries to be built])
fi fi
AC_ARG_ENABLE(boost-threads,
AC_HELP_STRING([--enable-boost-threads],
[use boost threads. Currently this only means using its locks instead of dummy locks, in the cache and NSAS]),
use_boost_threads=$enableval, use_boost_threads=no)
# allow configuring without setproctitle. # allow configuring without setproctitle.
AC_ARG_ENABLE(setproctitle-check, AC_ARG_ENABLE(setproctitle-check,
AC_HELP_STRING([--disable-setproctitle-check], AC_HELP_STRING([--disable-setproctitle-check],
...@@ -443,62 +448,69 @@ AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync ...@@ -443,62 +448,69 @@ AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync
CPPFLAGS="$CPPFLAGS_SAVES" CPPFLAGS="$CPPFLAGS_SAVES"
AC_SUBST(BOOST_INCLUDES) AC_SUBST(BOOST_INCLUDES)
# Using boost::mutex can result in requiring libboost_thread with older
# versions of Boost. We'd like to avoid relying on a compiled Boost library if test "${use_boost_threads}" = "yes" ; then
# whenever possible, so we need to check for it step by step. AC_DEFINE([USE_BOOST_THREADS], [], [Use boost threads])
#
# NOTE: another fix of this problem is to simply require newer versions of # Using boost::mutex can result in requiring libboost_thread with older
# boost. If we choose that solution we should simplify the following tricky # versions of Boost. We'd like to avoid relying on a compiled Boost library
# checks accordingly and all Makefile.am's that refer to NEED_LIBBOOST_THREAD. # whenever possible, so we need to check for it step by step.
AC_MSG_CHECKING(for boost::mutex) #
CPPFLAGS_SAVES="$CPPFLAGS" # NOTE: another fix of this problem is to simply require newer versions of
LIBS_SAVES="$LIBS" # boost. If we choose that solution we should simplify the following tricky
CPPFLAGS="$BOOST_INCLUDES $CPPFLAGS $MULTITHREADING_FLAG" # checks accordingly and all Makefile.am's that refer to NEED_LIBBOOST_THREAD.
need_libboost_thread=0 AC_MSG_CHECKING(for boost::mutex)
need_sunpro_workaround=0 CPPFLAGS_SAVES="$CPPFLAGS"
AC_TRY_LINK([ LIBS_SAVES="$LIBS"
#include <boost/thread.hpp> CPPFLAGS="$BOOST_INCLUDES $CPPFLAGS $MULTITHREADING_FLAG"
],[ need_libboost_thread=0
boost::mutex m; need_sunpro_workaround=0
], AC_TRY_LINK([
[ AC_MSG_RESULT(yes (without libboost_thread)) ], #include <boost/thread.hpp>
],[
# there is one specific problem with SunStudio 5.10 boost::mutex m;
# where including boost/thread causes a compilation failure ],
# There is a workaround in boost but it checks the version not being 5.10 [ AC_MSG_RESULT(yes (without libboost_thread)) ],
# This will probably be fixed in the future, in which case this # there is one specific problem with SunStudio 5.10
# is only a temporary workaround # where including boost/thread causes a compilation failure
[ AC_TRY_LINK([ # There is a workaround in boost but it checks the version not being 5.10
#if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100 # This will probably be fixed in the future, in which case this
#undef __SUNPRO_CC # is only a temporary workaround
#define __SUNPRO_CC 0x5090 [ AC_TRY_LINK([
#endif #if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100
#include <boost/thread.hpp> #undef __SUNPRO_CC
],[ #define __SUNPRO_CC 0x5090
boost::mutex m; #endif
], #include <boost/thread.hpp>
[ AC_MSG_RESULT(yes (with SUNOS workaround)) ],[
need_sunpro_workaround=1 ], boost::mutex m;
[ LIBS=" $LIBS -lboost_thread" ],
AC_TRY_LINK([ [ AC_MSG_RESULT(yes (with SUNOS workaround))
#include <boost/thread.hpp> need_sunpro_workaround=1 ],
],[ [ LIBS=" $LIBS -lboost_thread"
boost::mutex m; AC_TRY_LINK([
], #include <boost/thread.hpp>
[ AC_MSG_RESULT(yes (with libboost_thread)) ],[
need_libboost_thread=1 ], boost::mutex m;
[ AC_MSG_RESULT(no) ],
AC_MSG_ERROR([boost::mutex cannot be linked in this build environment. [ AC_MSG_RESULT(yes (with libboost_thread))
Perhaps you are using an older version of Boost that requires libboost_thread for the mutex support, which does not appear to be available. need_libboost_thread=1 ],
You may want to check the availability of the library or to upgrade Boost.]) [ AC_MSG_RESULT(no)
])])]) AC_MSG_ERROR([boost::mutex cannot be linked in this build environment.
CPPFLAGS="$CPPFLAGS_SAVES" Perhaps you are using an older version of Boost that requires libboost_thread for the mutex support, which does not appear to be available.
LIBS="$LIBS_SAVES" You may want to check the availability of the library or to upgrade Boost.])
AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test $need_libboost_thread = 1) ])])])
if test $need_sunpro_workaround = 1; then CPPFLAGS="$CPPFLAGS_SAVES"
AC_DEFINE([NEED_SUNPRO_WORKAROUND], [], [Need boost sunstudio workaround]) LIBS="$LIBS_SAVES"
AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test $need_libboost_thread = 1)
if test $need_sunpro_workaround = 1; then
AC_DEFINE([NEED_SUNPRO_WORKAROUND], [], [Need boost sunstudio workaround])
fi
else
AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test "${use_boost_threads}" = "yes")
fi fi
# #
# Check availability of gtest, which will be used for unit tests. # Check availability of gtest, which will be used for unit tests.
# #
......
...@@ -201,7 +201,7 @@ MockZone::find(const Name& name, const RRType& type, ...@@ -201,7 +201,7 @@ MockZone::find(const Name& name, const RRType& type,
// If not found but we have a target, fill it with all RRsets here // If not found but we have a target, fill it with all RRsets here
if (!found_domain->second.empty() && target != NULL) { if (!found_domain->second.empty() && target != NULL) {
for (found_rrset = found_domain->second.begin(); for (found_rrset = found_domain->second.begin();
found_rrset != found_domain->second.end(); found_rrset++) { found_rrset != found_domain->second.end(); ++found_rrset) {
// Insert RRs under the domain name into target // Insert RRs under the domain name into target
target->addRRset( target->addRRset(
boost::const_pointer_cast<RRset>(found_rrset->second)); boost::const_pointer_cast<RRset>(found_rrset->second));
......
...@@ -1157,7 +1157,7 @@ MetaDataSrc::addDataSrc(ConstDataSrcPtr data_src) { ...@@ -1157,7 +1157,7 @@ MetaDataSrc::addDataSrc(ConstDataSrcPtr data_src) {
void void
MetaDataSrc::removeDataSrc(ConstDataSrcPtr data_src) { MetaDataSrc::removeDataSrc(ConstDataSrcPtr data_src) {
std::vector<ConstDataSrcPtr>::iterator it, itr; std::vector<ConstDataSrcPtr>::iterator it, itr;
for (it = data_sources.begin(); it != data_sources.end(); it++) { for (it = data_sources.begin(); it != data_sources.end(); ++it) {
if (*it == data_src) { if (*it == data_src) {
itr = it; itr = it;
} }
......
...@@ -515,7 +515,7 @@ struct MemoryZone::MemoryZoneImpl { ...@@ -515,7 +515,7 @@ struct MemoryZone::MemoryZoneImpl {
if (target != NULL && !node->getData()->empty()) { if (target != NULL && !node->getData()->empty()) {
// Empty domain will be handled as NXRRSET by normal processing // Empty domain will be handled as NXRRSET by normal processing
for (found = node->getData()->begin(); for (found = node->getData()->begin();
found != node->getData()->end(); found++) found != node->getData()->end(); ++found)
{ {
target->addRRset( target->addRRset(
boost::const_pointer_cast<RRset>(prepareRRset(name, boost::const_pointer_cast<RRset>(prepareRRset(name,
......
...@@ -25,6 +25,7 @@ libnsas_la_SOURCES += asiolink.h ...@@ -25,6 +25,7 @@ libnsas_la_SOURCES += asiolink.h
libnsas_la_SOURCES += hash.cc hash.h libnsas_la_SOURCES += hash.cc hash.h
libnsas_la_SOURCES += hash_deleter.h libnsas_la_SOURCES += hash_deleter.h
libnsas_la_SOURCES += hash_key.cc hash_key.h libnsas_la_SOURCES += hash_key.cc hash_key.h
libnsas_la_SOURCES += locks.h
libnsas_la_SOURCES += hash_table.h libnsas_la_SOURCES += hash_table.h
libnsas_la_SOURCES += lru_list.h libnsas_la_SOURCES += lru_list.h
libnsas_la_SOURCES += nameserver_address_store.cc nameserver_address_store.h libnsas_la_SOURCES += nameserver_address_store.cc nameserver_address_store.h
......
...@@ -15,25 +15,11 @@ ...@@ -15,25 +15,11 @@
#ifndef __HASH_TABLE_H #ifndef __HASH_TABLE_H
#define __HASH_TABLE_H #define __HASH_TABLE_H
// Workaround for a problem with boost and sunstudio 5.10 #include <list>
// 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/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#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 <list>
#include "locks.h"
#include "hash.h" #include "hash.h"
#include "hash_key.h" #include "hash_key.h"
...@@ -61,7 +47,7 @@ struct HashTableSlot { ...@@ -61,7 +47,7 @@ struct HashTableSlot {
typedef typename std::list<boost::shared_ptr<T> >::iterator iterator; typedef typename std::list<boost::shared_ptr<T> >::iterator iterator;
///< Iterator over elements with same hash ///< Iterator over elements with same hash
typedef boost::interprocess::interprocess_upgradable_mutex mutex_type; typedef isc::locks::upgradable_mutex mutex_type;
///< Mutex protecting this slot ///< Mutex protecting this slot
//@} //@}
...@@ -128,11 +114,11 @@ public: ...@@ -128,11 +114,11 @@ public:
/// ///
//@{ //@{
typedef typename typedef typename
boost::interprocess::sharable_lock<typename HashTableSlot<T>::mutex_type> isc::locks::sharable_lock<typename HashTableSlot<T>::mutex_type>
sharable_lock; ///< Type for a scope-limited read-lock sharable_lock; ///< Type for a scope-limited read-lock
typedef typename typedef typename
boost::interprocess::scoped_lock<typename HashTableSlot<T>::mutex_type> isc::locks::scoped_lock<typename HashTableSlot<T>::mutex_type>
scoped_lock; ///< Type for a scope-limited write-lock scoped_lock; ///< Type for a scope-limited write-lock
//@} //@}
......
// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
/// 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.
///
/// 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
/// (TODO)
/// Note that this also contains a workaround for Sunstudio; which
/// probably won't completely work right now (that is, if the TODO
/// above is completed), since that would also require some changes
/// in most (at first glance unrelated) Makefiles
/// (TODO2)
#ifndef __LOCKS_
#define __LOCKS_
#ifndef USE_BOOST_THREADS
namespace isc {
namespace locks {
class mutex {
};
class recursive_mutex {
};
class upgradable_mutex {
};
template <typename T>
class sharable_lock {
public:
sharable_lock(T) { }
};
template <typename T>
class scoped_lock {
public:
scoped_lock(T) { }
void lock() {}
void unlock() {}
};
}
}
#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 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) { }
};
}
}
#endif // USE_BOOST_THREADS
#endif // __LOCKS_
...@@ -18,22 +18,10 @@ ...@@ -18,22 +18,10 @@
#include <list> #include <list>
#include <string> #include <string>
// 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/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp> #include "locks.h"
namespace isc { namespace isc {
namespace nsas { namespace nsas {
...@@ -151,7 +139,7 @@ public: ...@@ -151,7 +139,7 @@ public:
} }
private: private:
boost::mutex mutex_; ///< List protection isc::locks::mutex mutex_; ///< List protection
std::list<boost::shared_ptr<T> > lru_; ///< The LRU list itself std::list<boost::shared_ptr<T> > lru_; ///< The LRU list itself
uint32_t max_size_; ///< Max size of the list uint32_t max_size_; ///< Max size of the list
uint32_t count_; ///< Count of elements uint32_t count_; ///< Count of elements
...@@ -163,7 +151,7 @@ template <typename T> ...@@ -163,7 +151,7 @@ template <typename T>
void LruList<T>::add(boost::shared_ptr<T>& element) { void LruList<T>::add(boost::shared_ptr<T>& element) {
// Protect list against concurrent access // Protect list against concurrent access
boost::interprocess::scoped_lock<boost::mutex> lock(mutex_); isc::locks::scoped_lock<isc::locks::mutex> lock(mutex_);
// Add the entry and set its pointer field to point into the list. // Add the entry and set its pointer field to point into the list.
// insert() is used to get the pointer. // insert() is used to get the pointer.
...@@ -212,7 +200,7 @@ void LruList<T>::remove(boost::shared_ptr<T>& element) { ...@@ -212,7 +200,7 @@ void LruList<T>::remove(boost::shared_ptr<T>& element) {
if (element->iteratorValid()) { if (element->iteratorValid()) {
// Is valid, so protect list against concurrent access // Is valid, so protect list against concurrent access
boost::interprocess::scoped_lock<boost::mutex> lock(mutex_); isc::locks::scoped_lock<isc::locks::mutex> lock(mutex_);
lru_.erase(element->getLruIterator()); // Remove element from list lru_.erase(element->getLruIterator()); // Remove element from list
element->invalidateIterator(); // Invalidate pointer element->invalidateIterator(); // Invalidate pointer
...@@ -228,7 +216,7 @@ void LruList<T>::touch(boost::shared_ptr<T>& element) { ...@@ -228,7 +216,7 @@ void LruList<T>::touch(boost::shared_ptr<T>& element) {
if (element->iteratorValid()) { if (element->iteratorValid()) {
// Protect list against concurrent access // Protect list against concurrent access
boost::interprocess::scoped_lock<boost::mutex> lock(mutex_); isc::locks::scoped_lock<isc::locks::mutex> lock(mutex_);
// Move the element to the end of the list. // Move the element to the end of the list.
lru_.splice(lru_.end(), lru_, element->getLruIterator()); lru_.splice(lru_.end(), lru_, element->getLruIterator());
......
...@@ -14,20 +14,6 @@ ...@@ -14,20 +14,6 @@
#include <config.h> #include <config.h>
// 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/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
...@@ -35,6 +21,7 @@ ...@@ -35,6 +21,7 @@
#include <config.h> #include <config.h>
#include <dns/rdataclass.h> #include <dns/rdataclass.h>
#include "locks.h"
#include "hash_table.h" #include "hash_table.h"
#include "lru_list.h" #include "lru_list.h"
#include "hash_deleter.h" #include "hash_deleter.h"
......
...@@ -50,7 +50,7 @@ namespace nsas { ...@@ -50,7 +50,7 @@ namespace nsas {
namespace { namespace {
// Just shorter type alias // Just shorter type alias
typedef boost::recursive_mutex::scoped_lock Lock; typedef isc::locks::scoped_lock<isc::locks::recursive_mutex> Lock;
} }
......
...@@ -15,21 +15,8 @@ ...@@ -15,21 +15,8 @@
#ifndef __NAMESERVER_ENTRY_H #ifndef __NAMESERVER_ENTRY_H
#define __NAMESERVER_ENTRY_H #define __NAMESERVER_ENTRY_H
// 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 <string> #include <string>
#include <vector> #include <vector>
#include <boost/thread.hpp>
#include <boost/enable_shared_from_this.hpp> #include <boost/enable_shared_from_this.hpp>
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
...@@ -252,7 +239,7 @@ public: ...@@ -252,7 +239,7 @@ public:
//@} //@}
private: private:
mutable boost::recursive_mutex mutex_; ///< Mutex protecting this object mutable isc::locks::recursive_mutex mutex_;///< Mutex protecting this object
std::string name_; ///< Canonical name of the nameserver std::string name_; ///< Canonical name of the nameserver
isc::dns::RRClass classCode_; ///< Class of the nameserver isc::dns::RRClass classCode_; ///< Class of the nameserver
/** /**
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <map>
#include <config.h> #include <config.h>
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE. // PERFORMANCE OF THIS SOFTWARE.
#include <map>
#include <config.h> #include <config.h>
#include "zone_entry.h" #include "zone_entry.h"
...@@ -49,7 +51,7 @@ ZoneEntry::ZoneEntry( ...@@ -49,7 +51,7 @@ ZoneEntry::ZoneEntry(
namespace { namespace {
// Shorter aliases for frequently used types // Shorter aliases for frequently used types
typedef boost::recursive_mutex::scoped_lock Lock; // Local lock, nameservers not locked typedef isc::locks::scoped_lock<isc::locks::recursive_mutex> Lock; // Local lock, nameservers not locked
typedef boost::shared_ptr<AddressRequestCallback> CallbackPtr; typedef boost::shared_ptr<AddressRequestCallback> CallbackPtr;
/* /*
......
...@@ -15,22 +15,9 @@ ...@@ -15,22 +15,9 @@
#ifndef __ZONE_ENTRY_H #ifndef __ZONE_ENTRY_H
#define __ZONE_ENTRY_H #define __ZONE_ENTRY_H
// 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 <string> #include <string>
#include <vector> #include <vector>
#include <set> #include <set>
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp> #include <boost/enable_shared_from_this.hpp>
...@@ -38,6 +25,7 @@ ...@@ -38,6 +25,7 @@
#include <resolve/resolver_interface.h> #include <resolve/resolver_interface.h>
#include "locks.h"
#include "hash_key.h" #include "hash_key.h"
#include "nsas_entry.h" #include "nsas_entry.h"
#include "asiolink.h" #include "asiolink.h"
...@@ -131,7 +119,7 @@ protected: ...@@ -131,7 +119,7 @@ protected:
time_t expiry_; ///< Expiry time of this entry, 0 means not set time_t expiry_; ///< Expiry time of this entry, 0 means not set
//}@ //}@
private: private:
mutable boost::recursive_mutex mutex_; ///< Mutex protecting this zone entry mutable isc::locks::recursive_mutex mutex_;///< Mutex protecting this zone entry
std::string name_; ///< Canonical zone name std::string name_; ///< Canonical zone name
isc::dns::RRClass class_code_; ///< Class code isc::dns::RRClass class_code_; ///< Class code
/** /**
......