tor  0.4.2.0-alpha-dev
Data Fields
scheduler_s Struct Reference

#include <scheduler.h>

Data Fields

scheduler_types_t type
 
void(* init )(void)
 
void(* free_all )(void)
 
void(* schedule )(void)
 
void(* run )(void)
 
void(* on_new_consensus )(void)
 
void(* on_channel_free )(const channel_t *)
 
void(* on_new_options )(void)
 

Detailed Description

A scheduler implementation is a collection of function pointers. If you would like to add a new scheduler called foo, create scheduler_foo.c, implement at least the mandatory ones, and implement get_foo_scheduler() that returns a complete scheduler_t for your foo scheduler. See scheduler_kist.c for an example.

These function pointers SHOULD NOT be used anywhere outside of the scheduling source files. The rest of Tor should communicate with the scheduling system through the functions near the bottom of this file, and those functions will call into the current scheduler implementation as necessary.

If your scheduler doesn't need to implement something (for example: it doesn't create any state for itself, thus it has nothing to free when Tor is shutting down), then set that function pointer to NULL.

Definition at line 43 of file scheduler.h.


The documentation for this struct was generated from the following file: