diff options
author | David Goulet <dgoulet@torproject.org> | 2017-09-15 09:06:11 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-09-15 11:40:59 -0400 |
commit | 1033e14a693e8d80341428b592779fe145eb3152 (patch) | |
tree | ea3d7d1f97f4e73a6464127181dd02371d208c7c | |
parent | c910610701475d6fcb13284c318fe5c10fc4bdea (diff) | |
download | tor-1033e14a693e8d80341428b592779fe145eb3152.tar.gz tor-1033e14a693e8d80341428b592779fe145eb3152.zip |
sched: Define SCHEDULER_KIST_PRIVATE for more encapsulation
Signed-off-by: David Goulet <dgoulet@torproject.org>
-rw-r--r-- | src/or/scheduler.c | 1 | ||||
-rw-r--r-- | src/or/scheduler.h | 4 | ||||
-rw-r--r-- | src/or/scheduler_kist.c | 2 | ||||
-rw-r--r-- | src/test/test_scheduler.c | 1 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/or/scheduler.c b/src/or/scheduler.c index 3860c62c40..e2466c01a1 100644 --- a/src/or/scheduler.c +++ b/src/or/scheduler.c @@ -6,6 +6,7 @@ #include "compat_libevent.h" #define SCHEDULER_PRIVATE_ +#define SCHEDULER_KIST_PRIVATE #include "scheduler.h" #include <event2/event.h> diff --git a/src/or/scheduler.h b/src/or/scheduler.h index 7766b21425..98c3599817 100644 --- a/src/or/scheduler.h +++ b/src/or/scheduler.h @@ -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 *********************************/ diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c index 262d618160..2dc30306df 100644 --- a/src/or/scheduler_kist.c +++ b/src/or/scheduler_kist.c @@ -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> diff --git a/src/test/test_scheduler.c b/src/test/test_scheduler.c index 963c7927a7..51bedb3f9c 100644 --- a/src/test/test_scheduler.c +++ b/src/test/test_scheduler.c @@ -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" |