blob: f14ecb261bcfb892f5d99fcc601f23fc140da3f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* @file mainloop_sys.c
* @brief Declare the "mainloop" subsystem.
**/
#include "core/or/or.h"
#include "core/mainloop/mainloop_sys.h"
#include "core/mainloop/mainloop.h"
#include "lib/subsys/subsys.h"
static int
subsys_mainloop_initialize(void)
{
initialize_periodic_events();
return 0;
}
static void
subsys_mainloop_shutdown(void)
{
tor_mainloop_free_all();
}
const struct subsys_fns_t sys_mainloop = {
.name = "mainloop",
.supported = true,
.level = 5,
.initialize = subsys_mainloop_initialize,
.shutdown = subsys_mainloop_shutdown,
};
|