blob: fbd5a40327a7aaa8adc0c153169dc92b5ca69061 (
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
|
/* 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 */
#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,
};
|