Commit c7ce6b98 authored by Nick Mathewson's avatar Nick Mathewson 🎨
Browse files

Split main.c into main.c and mainloop.c

The main.c code is responsible for initialization and shutdown;
the mainloop.c code is responsible for running the main loop of Tor.

Splitting the "generic event loop" part of mainloop.c from the
event-loop-specific part is not done as part of this patch.
parent 98ef3e82
......@@ -8,7 +8,7 @@
#define SCHEDULER_PRIVATE_
#define SCHEDULER_KIST_PRIVATE
#include "core/or/scheduler.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "lib/container/buffers.h"
#define TOR_CHANNEL_INTERNAL_
#include "core/or/channeltls.h"
......
......@@ -22,7 +22,7 @@
#include "core/or/relay.h"
#include "feature/relay/router.h"
#include "core/or/circuitlist.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/stats/rephist.h"
#include "feature/hibernate/hibernate.h"
#include "app/config/statefile.h"
......
......@@ -27,7 +27,7 @@
#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "feature/control/control.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/control/control_connection_st.h"
......
......@@ -127,7 +127,7 @@
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/dircache/directory.h"
#include "feature/client/entrynodes.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
......
......@@ -65,7 +65,8 @@
#include "feature/hs/hs_cache.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_control.h"
#include "core/mainloop/main.h"
#include "app/main/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
......
......@@ -14,7 +14,7 @@
#include "feature/dirauth/voteflags.h"
#include "app/config/config.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/dirauth/bwauth.h"
#include "feature/dirauth/reachability.h"
......
......@@ -30,7 +30,7 @@
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_control.h"
#include "feature/hs/hs_client.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
......
......@@ -38,7 +38,7 @@ hibernating, phase 2:
#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/hibernate/hibernate.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/relay/router.h"
#include "app/config/statefile.h"
#include "lib/evloop/compat_libevent.h"
......
......@@ -20,7 +20,7 @@
#include "lib/crypt_ops/crypto_ope.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/dircache/directory.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/relay.h"
......
......@@ -20,7 +20,7 @@
#include "app/config/config.h"
#include "core/mainloop/connection.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/client/bridges.h"
#include "feature/dircache/directory.h"
......
......@@ -29,7 +29,7 @@
/* #include "feature/dircache/dirserv.h" */
/* #include "feature/hibernate/hibernate.h" */
/* #include "feature/dirauth/keypin.h" */
/* #include "core/mainloop/main.h" */
/* #include "core/mainloop/mainloop.h" */
/* #include "feature/nodelist/microdesc.h" */
/* #include "feature/nodelist/networkstatus.h" */
/* #include "feature/nodelist/nodelist.h" */
......
......@@ -57,7 +57,7 @@
#include "core/or/dos.h"
#include "feature/client/entrynodes.h"
#include "feature/hibernate/hibernate.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
......
......@@ -52,7 +52,7 @@
#include "feature/stats/geoip.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_client.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
......
......@@ -64,7 +64,7 @@
#include "app/config/config.h"
#include "core/mainloop/connection.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/client/bridges.h"
#include "feature/control/control.h"
......
......@@ -58,7 +58,7 @@
#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/relay/dns.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "core/or/relay.h"
#include "feature/relay/router.h"
......
......@@ -25,7 +25,7 @@
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "feature/relay/ext_orport.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "core/proto/proto_ext_or.h"
#include "core/or/or_connection_st.h"
......
......@@ -22,7 +22,8 @@
#include "feature/relay/dns.h"
#include "feature/stats/geoip.h"
#include "feature/hibernate/hibernate.h"
#include "core/mainloop/main.h"
#include "app/main/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/policies.h"
......
......@@ -23,7 +23,7 @@
#include "feature/hs/hs_circuit.h"
#include "feature/hs/hs_client.h"
#include "feature/hs/hs_common.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/relay.h"
......
......@@ -22,7 +22,7 @@
#include "feature/dircache/directory.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_config.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/policies.h"
......
......@@ -32,7 +32,7 @@
#define ROUTER_PRIVATE
#define CIRCUITSTATS_PRIVATE
#define CIRCUITLIST_PRIVATE
#define MAIN_PRIVATE
#define MAINLOOP_PRIVATE
#define STATEFILE_PRIVATE
#include "core/or/or.h"
......@@ -46,7 +46,7 @@
#include "feature/rend/rendcommon.h"
#include "feature/rend/rendcache.h"
#include "test/test.h"
#include "core/mainloop/main.h"
#include "core/mainloop/mainloop.h"
#include "lib/memarea/memarea.h"
#include "core/or/onion.h"
#include "core/crypto/onion_ntor.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment