aboutsummaryrefslogtreecommitdiff
path: root/src/or/scheduler.h
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2013-08-25 08:45:07 -0700
committerAndrea Shepard <andrea@torproject.org>2014-09-30 22:48:24 -0700
commitd438cf1ec9d5de08b8a8fffd7c38b66134fd337c (patch)
tree0ce78e25fde753880ff5bf092c1599d982d0c8a5 /src/or/scheduler.h
parent1987157d0c1e9acb0b88156e7104fbc8a11c5932 (diff)
downloadtor-d438cf1ec9d5de08b8a8fffd7c38b66134fd337c.tar.gz
tor-d438cf1ec9d5de08b8a8fffd7c38b66134fd337c.zip
Implement scheduler mechanism to track lists of channels wanting cells or writes; doesn't actually drive the cell flow from it yet
Diffstat (limited to 'src/or/scheduler.h')
-rw-r--r--src/or/scheduler.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/or/scheduler.h b/src/or/scheduler.h
new file mode 100644
index 0000000000..b25e36e902
--- /dev/null
+++ b/src/or/scheduler.h
@@ -0,0 +1,31 @@
+/* * Copyright (c) 2013, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file scheduler.h
+ * \brief Header file for scheduler.c
+ **/
+
+#ifndef TOR_SCHEDULER_H
+#define TOR_SCHEDULER_H
+
+#include "or.h"
+#include "channel.h"
+
+/* Global-visibility scheduler functions */
+
+/* Set up and shut down the scheduler from main.c */
+void scheduler_free_all(void);
+void scheduler_init(void);
+void scheduler_run(void);
+
+/* Mark channels as having cells or wanting/not wanting writes */
+void scheduler_channel_doesnt_want_writes(channel_t *chan);
+void scheduler_channel_has_waiting_cells(channel_t *chan);
+void scheduler_channel_wants_writes(channel_t *chan);
+
+/* Notify the scheduler of a channel being closed */
+void scheduler_release_channel(channel_t *chan);
+
+#endif /* !defined(TOR_SCHEDULER_H) */
+