aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/conflux_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/or/conflux_sys.c')
-rw-r--r--src/core/or/conflux_sys.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/core/or/conflux_sys.c b/src/core/or/conflux_sys.c
new file mode 100644
index 0000000000..7429b08b8f
--- /dev/null
+++ b/src/core/or/conflux_sys.c
@@ -0,0 +1,37 @@
+/* Copyright (c) 2023, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file conflux_sys.c
+ * \brief Register the conflux pool for early initialization.
+ **/
+
+#include "core/or/conflux_pool.h"
+#include "core/or/conflux_sys.h"
+
+#include "lib/subsys/subsys.h"
+
+static int
+subsys_conflux_initialize(void)
+{
+ conflux_pool_init();
+ return 0;
+}
+
+static void
+subsys_conflux_shutdown(void)
+{
+ /* The conflux pool free all must be called before the circuit free all and
+ * so we are not calling it from subsys shutdown. */
+}
+
+const subsys_fns_t sys_conflux = {
+ SUBSYS_DECLARE_LOCATION(),
+
+ .name = "conflux",
+ .supported = true,
+ .level = CONFLUX_SUBSYS_LEVEL,
+
+ .initialize = subsys_conflux_initialize,
+ .shutdown = subsys_conflux_shutdown,
+};