From: Razvan Becheriu Date: Mon, 25 Mar 2019 16:50:58 +0000 (+0200) Subject: removed mutex X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=166ee8b4e16b847063f0088a082663437f3afd58;p=thirdparty%2Fkea.git removed mutex --- diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 7d324ad4f7..73a8c4c536 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -454,8 +454,6 @@ Dhcpv4Srv::Dhcpv4Srv(uint16_t server_port, uint16_t client_port, cb_control_(new CBControlDHCPv4()), run_multithreaded_(run_multithreaded) { - mutex_.reset(new std::mutex()); - LOG_DEBUG(dhcp4_logger, DBG_DHCP4_START, DHCP4_OPEN_SOCKET) .arg(server_port); diff --git a/src/bin/dhcp4/dhcp4_srv.h b/src/bin/dhcp4/dhcp4_srv.h index 05ffc8616e..9660297a38 100644 --- a/src/bin/dhcp4/dhcp4_srv.h +++ b/src/bin/dhcp4/dhcp4_srv.h @@ -1026,12 +1026,6 @@ protected: /// @brief Packet processing thread pool ThreadPool pkt_thread_pool_; - // Global mutex used to serialize packet thread pool's threads - // on the not thread safe code and allow threads to run - // simultaneously on the thread safe portions - // (e.g. CqlLeaseMgr class instance). - boost::scoped_ptr mutex_; - // Specifies if the application will use a thread pool or will process // received DHCP packets on the main thread. // It is mandatory to be set on false when running the test cases. diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index bc315587bb..d3b4025e29 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -181,7 +181,8 @@ namespace dhcp { const std::string Dhcpv6Srv::VENDOR_CLASS_PREFIX("VENDOR_CLASS_"); -Dhcpv6Srv::Dhcpv6Srv(uint16_t server_port, uint16_t client_port, bool run_multithreaded /* = false */) +Dhcpv6Srv::Dhcpv6Srv(uint16_t server_port, uint16_t client_port, + bool run_multithreaded /* = false */) : io_service_(new IOService()), server_port_(server_port), client_port_(client_port), serverid_(), shutdown_(true), alloc_engine_(), name_change_reqs_(), @@ -189,8 +190,6 @@ Dhcpv6Srv::Dhcpv6Srv(uint16_t server_port, uint16_t client_port, bool run_multit cb_control_(new CBControlDHCPv6()), run_multithreaded_(run_multithreaded) { - mutex_.reset(new std::mutex()); - LOG_DEBUG(dhcp6_logger, DBG_DHCP6_START, DHCP6_OPEN_SOCKET) .arg(server_port); diff --git a/src/bin/dhcp6/dhcp6_srv.h b/src/bin/dhcp6/dhcp6_srv.h index 6711ea80eb..1ebd0b94ff 100644 --- a/src/bin/dhcp6/dhcp6_srv.h +++ b/src/bin/dhcp6/dhcp6_srv.h @@ -1051,12 +1051,6 @@ protected: /// @brief Packet processing thread pool ThreadPool pkt_thread_pool_; - // Global mutex used to serialize packet thread pool's threads - // on the not thread safe code and allow threads to run - // simultaneously on the thread safe portions - // (e.g. CqlLeaseMgr class instance). - boost::scoped_ptr mutex_; - // Specifies if the application will use a thread pool or will process // received DHCP packets on the main thread. // It is mandatory to be set on false when running the test cases.