]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
sched: Define SCHEDULER_KIST_PRIVATE for more encapsulation
authorDavid Goulet <dgoulet@torproject.org>
Fri, 15 Sep 2017 13:06:11 +0000 (09:06 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Fri, 15 Sep 2017 15:40:59 +0000 (11:40 -0400)
Signed-off-by: David Goulet <dgoulet@torproject.org>
src/or/scheduler.c
src/or/scheduler.h
src/or/scheduler_kist.c
src/test/test_scheduler.c

index 3860c62c4012674560c5b5e98267f0f07ef25372..e2466c01a129f72271f659e747f384d505713d3d 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "compat_libevent.h"
 #define SCHEDULER_PRIVATE_
+#define SCHEDULER_KIST_PRIVATE
 #include "scheduler.h"
 
 #include <event2/event.h>
index 7766b21425ee3a39d4ae6f4d62260366a5912d47..98c3599817c7544e21aacfb248f2126f6a9c2dec 100644 (file)
@@ -155,6 +155,8 @@ void scheduler_touch_channel(channel_t *chan);
  * Defined in scheduler_kist.c
  *********************************/
 
+#ifdef SCHEDULER_KIST_PRIVATE
+
 /* Socke table entry which holds information of a channel's socket and kernel
  * TCP information. Only used by KIST. */
 typedef struct socket_table_ent_s {
@@ -188,6 +190,8 @@ int32_t kist_scheduler_run_interval(const networkstatus_t *ns);
 extern int32_t sched_run_interval;
 #endif /* TOR_UNIT_TESTS */
 
+#endif /* SCHEDULER_KIST_PRIVATE */
+
 /*********************************
  * Defined in scheduler_vanilla.c
  *********************************/
index 262d6181601b1bea5bcaee9af4659f369f70f7cc..2dc30306df2fdb998046ec09c9ceed46d4ac15e0 100644 (file)
@@ -1,6 +1,8 @@
 /* Copyright (c) 2017, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 
+#define SCHEDULER_KIST_PRIVATE
+
 #include <event2/event.h>
 #include <netinet/tcp.h>
 
index 963c7927a76aa1d435ad14f20c3415dc632e1621..51bedb3f9c0cf7b5042cb1b71671a740104bdf30 100644 (file)
@@ -6,6 +6,7 @@
 #include <math.h>
 #include <event2/event.h>
 
+#define SCHEDULER_KIST_PRIVATE
 #define TOR_CHANNEL_INTERNAL_
 #define CHANNEL_PRIVATE_
 #include "or.h"