summaryrefslogtreecommitdiff
path: root/src/or/scheduler.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-14 14:47:59 -0400
committerDavid Goulet <dgoulet@torproject.org>2017-09-15 11:40:59 -0400
commit734dbfa590baf560741f0754bd81c07dfb829485 (patch)
tree4cf32837fd3823ac53b4244e6aab794a4a6eec46 /src/or/scheduler.h
parentbd34a0d30f754f3dd75199d915febe918d058f30 (diff)
downloadtor-734dbfa590baf560741f0754bd81c07dfb829485.tar.gz
tor-734dbfa590baf560741f0754bd81c07dfb829485.zip
sched: Make the scheduler object static
Each type of scheduler implements its own static scheduler_t object and returns a reference to it. This commit also makes it a const pointer that is it can only change inside the scheduler type subsystem but not outside for extra protection. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/scheduler.h')
-rw-r--r--src/or/scheduler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/scheduler.h b/src/or/scheduler.h
index c69f763ffb..7766b21425 100644
--- a/src/or/scheduler.h
+++ b/src/or/scheduler.h
@@ -147,7 +147,7 @@ void scheduler_ev_add(const struct timeval *next_run);
#ifdef TOR_UNIT_TESTS
extern smartlist_t *channels_pending;
extern struct event *run_sched_ev;
-extern scheduler_t *the_scheduler;
+extern const scheduler_t *the_scheduler;
void scheduler_touch_channel(channel_t *chan);
#endif /* TOR_UNIT_TESTS */