conflux_sys.c (777B)
1 /* Copyright (c) 2023, The Tor Project, Inc. */ 2 /* See LICENSE for licensing information */ 3 4 /** 5 * \file conflux_sys.c 6 * \brief Register the conflux pool for early initialization. 7 **/ 8 9 #include "core/or/conflux_pool.h" 10 #include "core/or/conflux_sys.h" 11 12 #include "lib/subsys/subsys.h" 13 14 static int 15 subsys_conflux_initialize(void) 16 { 17 conflux_pool_init(); 18 return 0; 19 } 20 21 static void 22 subsys_conflux_shutdown(void) 23 { 24 /* The conflux pool free all must be called before the circuit free all and 25 * so we are not calling it from subsys shutdown. */ 26 } 27 28 const subsys_fns_t sys_conflux = { 29 SUBSYS_DECLARE_LOCATION(), 30 31 .name = "conflux", 32 .supported = true, 33 .level = CONFLUX_SUBSYS_LEVEL, 34 35 .initialize = subsys_conflux_initialize, 36 .shutdown = subsys_conflux_shutdown, 37 };