[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Make scheduler_run() mockable



commit f8ceb0f028eb7661cb31b2f82d5a82460e96ece9
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
Date:   Fri Jan 24 07:03:14 2014 -0800

    Make scheduler_run() mockable
---
 src/or/scheduler.c |    4 ++--
 src/or/scheduler.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/or/scheduler.c b/src/or/scheduler.c
index 544ec83..bf86810 100644
--- a/src/or/scheduler.c
+++ b/src/or/scheduler.c
@@ -376,8 +376,8 @@ scheduler_release_channel,(channel_t *chan))
 
 /** Run the scheduling algorithm if necessary */
 
-void
-scheduler_run(void)
+MOCK_IMPL(void,
+scheduler_run, (void))
 {
   int n_cells, n_chans_before, n_chans_after;
   uint64_t q_len_before, q_heur_before, q_len_after, q_heur_after;
diff --git a/src/or/scheduler.h b/src/or/scheduler.h
index b99491b..b0b66ee 100644
--- a/src/or/scheduler.h
+++ b/src/or/scheduler.h
@@ -18,7 +18,7 @@
 /* Set up and shut down the scheduler from main.c */
 void scheduler_free_all(void);
 void scheduler_init(void);
-void scheduler_run(void);
+MOCK_DECL(void, scheduler_run, (void));
 
 /* Mark channels as having cells or wanting/not wanting writes */
 MOCK_DECL(void,scheduler_channel_doesnt_want_writes,(channel_t *chan));



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits