mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Make some scheduler.c static functions visible to the test suite
This commit is contained in:
parent
0af88f9096
commit
71a9ed6feb
@ -12,6 +12,7 @@
|
|||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
|
|
||||||
#include "compat_libevent.h"
|
#include "compat_libevent.h"
|
||||||
|
#define SCHEDULER_PRIVATE_
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
|
|
||||||
#ifdef HAVE_EVENT2_EVENT_H
|
#ifdef HAVE_EVENT2_EVENT_H
|
||||||
@ -141,8 +142,6 @@ static void scheduler_retrigger(void);
|
|||||||
#if 0
|
#if 0
|
||||||
static void scheduler_trigger(void);
|
static void scheduler_trigger(void);
|
||||||
#endif
|
#endif
|
||||||
static uint64_t scheduler_get_queue_heuristic(void);
|
|
||||||
static void scheduler_update_queue_heuristic(time_t now);
|
|
||||||
|
|
||||||
/* Scheduler function implementations */
|
/* Scheduler function implementations */
|
||||||
|
|
||||||
@ -642,7 +641,7 @@ scheduler_adjust_queue_size(channel_t *chan, char dir, uint64_t adj)
|
|||||||
* Query the current value of the queue heuristic
|
* Query the current value of the queue heuristic
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uint64_t
|
STATIC uint64_t
|
||||||
scheduler_get_queue_heuristic(void)
|
scheduler_get_queue_heuristic(void)
|
||||||
{
|
{
|
||||||
time_t now = approx_time();
|
time_t now = approx_time();
|
||||||
@ -656,7 +655,7 @@ scheduler_get_queue_heuristic(void)
|
|||||||
* Adjust the queue heuristic value to the present time
|
* Adjust the queue heuristic value to the present time
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
STATIC void
|
||||||
scheduler_update_queue_heuristic(time_t now)
|
scheduler_update_queue_heuristic(time_t now)
|
||||||
{
|
{
|
||||||
time_t diff;
|
time_t diff;
|
||||||
|
@ -34,5 +34,12 @@ void scheduler_adjust_queue_size(channel_t *chan, char dir, uint64_t adj);
|
|||||||
/* Notify scheduler that a channel's queue position may have changed */
|
/* Notify scheduler that a channel's queue position may have changed */
|
||||||
void scheduler_touch_channel(channel_t *chan);
|
void scheduler_touch_channel(channel_t *chan);
|
||||||
|
|
||||||
|
/* Things only scheduler.c and its test suite should see */
|
||||||
|
|
||||||
|
#ifdef SCHEDULER_PRIVATE_
|
||||||
|
STATIC uint64_t scheduler_get_queue_heuristic(void);
|
||||||
|
STATIC void scheduler_update_queue_heuristic(time_t now);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !defined(TOR_SCHEDULER_H) */
|
#endif /* !defined(TOR_SCHEDULER_H) */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user