Squashed commit of the following:
commit
dd1db94f1e3c8a74f64c7f08912507b358646123
Author: Carter Waxman <cwaxman@cisco.com>
Date: Fri Sep 7 12:37:37 2018 -0400
Latency: added cleanup for RegexOffload threads
#include <thread>
#include "main/snort_config.h"
+#include "latency/packet_latency.h"
+#include "latency/rule_latency.h"
#include "fp_detect.h"
#include "ips_context.h"
req->offload = false;
}
+ tterm();
+}
+
+void RegexOffload::tterm()
+{
+ // FIXIT-M break this overcoupling. In reality we shouldn't be evaluating latency in offload.
+ PacketLatency::tterm();
+ RuleLatency::tterm();
}
void RegexOffload::put(unsigned id, snort::Packet* p)
private:
static void worker(RegexRequest*);
+ static void tterm();
private:
std::list<RegexRequest*> busy;
static THREAD_LOCAL Impl<>* impl = nullptr;
+// FIXIT-L this should probably be put in a tinit
static inline Impl<>& get_impl()
{
if ( !impl )
static THREAD_LOCAL Impl<>* impl = nullptr;
+// FIXIT-L this should probably be put in a tinit
static inline Impl<>& get_impl()
{
if ( !impl )