Move threading classes to zeek namespaces

This commit is contained in:
Tim Wojtulewicz 2020-08-01 10:48:46 -07:00
parent f310795d79
commit 1262109e5a
42 changed files with 299 additions and 210 deletions

View file

@ -8,7 +8,8 @@
#include "Event.h"
#include "IPAddr.h"
using namespace threading;
namespace zeek::threading {
namespace detail {
void HeartbeatTimer::Dispatch(double t, bool is_expire)
{
@ -19,6 +20,8 @@ void HeartbeatTimer::Dispatch(double t, bool is_expire)
thread_mgr->StartHeartbeatTimer();
}
} // namespace detail
Manager::Manager()
{
DBG_LOG(zeek::DBG_THREADING, "Creating thread manager ...");
@ -127,7 +130,7 @@ void Manager::SendHeartbeats()
void Manager::StartHeartbeatTimer()
{
heartbeat_timer_running = true;
zeek::detail::timer_mgr->Add(new HeartbeatTimer(network_time + zeek::BifConst::Threading::heartbeat_interval));
zeek::detail::timer_mgr->Add(new detail::HeartbeatTimer(network_time + zeek::BifConst::Threading::heartbeat_interval));
}
// Raise everything in here as warnings so it is passed to scriptland without
@ -269,3 +272,5 @@ const threading::Manager::msg_stats_list& threading::Manager::GetMsgThreadStats(
return stats;
}
} // namespace zeek::threading