Turn 'mainloop' into a subsystem.

We need a little refactoring for this to work, since the
initialization code for the periodic events assumes that libevent is
already initialized, which it can't be until it's configured.

This change, combined with the previous ones, lets other subsystems
declare their own periodic events, without mainloop.c having to know
about them.  Implements ticket 30293.
This commit is contained in:
Nick Mathewson
2019-04-25 14:20:41 -04:00
parent 0d650e7958
commit 6eb1b8da0a
8 changed files with 61 additions and 11 deletions
+2
View File
@@ -24,6 +24,7 @@ LIBTOR_APP_A_SOURCES = \
src/core/mainloop/cpuworker.c \
src/core/mainloop/mainloop.c \
src/core/mainloop/mainloop_pubsub.c \
src/core/mainloop/mainloop_sys.c \
src/core/mainloop/netstatus.c \
src/core/mainloop/periodic.c \
src/core/or/address_set.c \
@@ -222,6 +223,7 @@ noinst_HEADERS += \
src/core/mainloop/cpuworker.h \
src/core/mainloop/mainloop.h \
src/core/mainloop/mainloop_pubsub.h \
src/core/mainloop/mainloop_sys.h \
src/core/mainloop/netstatus.h \
src/core/mainloop/periodic.h \
src/core/or/addr_policy_st.h \