summaryrefslogtreecommitdiff
path: root/src/or/scheduler.c
diff options
context:
space:
mode:
authorMatt Traudt <sirmatt@ksu.edu>2017-12-11 09:32:47 -0500
committerMatt Traudt <sirmatt@ksu.edu>2017-12-11 09:43:09 -0500
commit667f9311776af65f7546a70c8ad5c27e0d23a02b (patch)
tree3b9cce840400b70c8bf34900347f3c34ff1bd830 /src/or/scheduler.c
parent8797c8fbd34132f462be4a4544270ee1b8a071cf (diff)
downloadtor-667f9311776af65f7546a70c8ad5c27e0d23a02b.tar.gz
tor-667f9311776af65f7546a70c8ad5c27e0d23a02b.zip
Make get_scheduler_state_string available to scheduler*.c
Diffstat (limited to 'src/or/scheduler.c')
-rw-r--r--src/or/scheduler.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/or/scheduler.c b/src/or/scheduler.c
index 1b6d160b84..09e8894a41 100644
--- a/src/or/scheduler.c
+++ b/src/or/scheduler.c
@@ -198,24 +198,6 @@ get_scheduler_type_string(scheduler_types_t type)
}
}
-/** Returns human readable string for the given channel scheduler state. */
-static const char *
-get_scheduler_state_string(int scheduler_state)
-{
- switch (scheduler_state) {
- case SCHED_CHAN_IDLE:
- return "IDLE";
- case SCHED_CHAN_WAITING_FOR_CELLS:
- return "WAITING_FOR_CELLS";
- case SCHED_CHAN_WAITING_TO_WRITE:
- return "WAITING_TO_WRITE";
- case SCHED_CHAN_PENDING:
- return "PENDING";
- default:
- return "(invalid)";
- }
-}
-
/**
* Scheduler event callback; this should get triggered once per event loop
* if any scheduling work was created during the event loop.
@@ -380,6 +362,24 @@ set_scheduler(void)
* Functions that can only be accessed from scheduler*.c
*****************************************************************************/
+/** Returns human readable string for the given channel scheduler state. */
+const char *
+get_scheduler_state_string(int scheduler_state)
+{
+ switch (scheduler_state) {
+ case SCHED_CHAN_IDLE:
+ return "IDLE";
+ case SCHED_CHAN_WAITING_FOR_CELLS:
+ return "WAITING_FOR_CELLS";
+ case SCHED_CHAN_WAITING_TO_WRITE:
+ return "WAITING_TO_WRITE";
+ case SCHED_CHAN_PENDING:
+ return "PENDING";
+ default:
+ return "(invalid)";
+ }
+}
+
/** Helper that logs channel scheduler_state changes. Use this instead of
* setting scheduler_state directly. */
void scheduler_set_channel_state(channel_t *chan, int new_state){