MINOR: threads/filters: Update trace filter to add _per_thread callbacks
diff --git a/src/flt_trace.c b/src/flt_trace.c
index 96ce2ac..fa26de1 100644
--- a/src/flt_trace.c
+++ b/src/flt_trace.c
@@ -15,6 +15,7 @@
 #include <common/standard.h>
 #include <common/time.h>
 #include <common/tools.h>
+#include <common/hathreads.h>
 
 #include <types/channel.h>
 #include <types/filters.h>
@@ -155,6 +156,26 @@
 	return 0;
 }
 
+/* Initialize the filter for each thread. Return -1 on error, else 0. */
+static int
+trace_init_per_thread(struct proxy *px, struct flt_conf *fconf)
+{
+	struct trace_config *conf = fconf->conf;
+
+	TRACE(conf, "filter initialized for thread tid %u", tid);
+	return 0;
+}
+
+/* Free ressources allocate by the trace filter for each thread. */
+static void
+trace_deinit_per_thread(struct proxy *px, struct flt_conf *fconf)
+{
+	struct trace_config *conf = fconf->conf;
+
+	if (conf)
+		TRACE(conf, "filter deinitialized for thread tid %u", tid);
+}
+
 /**************************************************************************
  * Hooks to handle start/stop of streams
  *************************************************************************/
@@ -509,9 +530,11 @@
  ********************************************************************/
 struct flt_ops trace_ops = {
 	/* Manage trace filter, called for each filter declaration */
-	.init   = trace_init,
-	.deinit = trace_deinit,
-	.check  = trace_check,
+	.init              = trace_init,
+	.deinit            = trace_deinit,
+	.check             = trace_check,
+	.init_per_thread   = trace_init_per_thread,
+	.deinit_per_thread = trace_deinit_per_thread,
 
 	/* Handle start/stop of streams */
 	.attach             = trace_attach,