Entry in list of pending tasks. More...
Data Fields | |
struct GNUNET_SCHEDULER_Task * | next |
This is a linked list. More... | |
struct GNUNET_SCHEDULER_Task * | prev |
This is a linked list. More... | |
GNUNET_SCHEDULER_TaskCallback | callback |
Function to run when ready. More... | |
void * | callback_cls |
Closure for the callback. More... | |
struct GNUNET_SCHEDULER_FdInfo * | fds |
Information about which FDs are ready for this task (and why). More... | |
struct GNUNET_SCHEDULER_FdInfo | fdx |
Storage location used for fds if we want to avoid a separate malloc() call in the common case that this task is only about a single FD. More... | |
unsigned int | fds_len |
Size of the fds array. More... | |
int | own_handles |
Do we own the network and file handles referenced by the FdInfo structs in the fds array. More... | |
struct GNUNET_TIME_Absolute | timeout |
Absolute timeout value for the task, or GNUNET_TIME_UNIT_FOREVER_ABS for "no timeout". More... | |
enum GNUNET_SCHEDULER_Reason | reason |
Why is the task ready? Set after task is added to ready queue. More... | |
enum GNUNET_SCHEDULER_Priority | priority |
Task priority. More... | |
int | read_fd |
Set if we only wait for reading from a single FD, otherwise -1. More... | |
int | write_fd |
Set if we only wait for writing to a single FD, otherwise -1. More... | |
int | lifeness |
Should the existence of this task in the queue be counted as reason to not shutdown the scheduler? More... | |
int | on_shutdown |
Is this task run on shutdown? More... | |
int | in_ready_list |
Is this task in the ready list? More... | |
struct GNUNET_AsyncScopeSave | scope |
Asynchronous scope of the task that scheduled this scope,. More... | |
Entry in list of pending tasks.
Definition at line 135 of file scheduler.c.
struct GNUNET_SCHEDULER_Task* GNUNET_SCHEDULER_Task::next |
This is a linked list.
Definition at line 140 of file scheduler.c.
Referenced by automaton_create_proofs(), automaton_destroy_state(), automaton_merge_states(), automaton_state_traverse(), dfa_add_multi_strides_helper(), dfa_compress_paths(), dfa_compress_paths_helper(), dfa_move(), dfa_remove_dead_states(), do_send(), find_peer_context(), get_timeout(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_do_work(), GNUNET_SCHEDULER_get_load(), iterate_initial_edge(), next_token(), parse(), parse_origin(), parse_ttl(), REGEX_INTERNAL_dfa_add_multi_strides(), scc_tarjan_strongconnect(), shutdown_if_no_lifeness(), state_add_transition(), and state_get_edges().
struct GNUNET_SCHEDULER_Task* GNUNET_SCHEDULER_Task::prev |
This is a linked list.
Definition at line 145 of file scheduler.c.
Referenced by GNUNET_SCHEDULER_add_at_with_priority().
GNUNET_SCHEDULER_TaskCallback GNUNET_SCHEDULER_Task::callback |
Function to run when ready.
Definition at line 150 of file scheduler.c.
Referenced by add_without_sets(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_select(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), and GNUNET_SCHEDULER_do_work().
void* GNUNET_SCHEDULER_Task::callback_cls |
Closure for the callback.
Definition at line 155 of file scheduler.c.
Referenced by add_without_sets(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_select(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), GNUNET_SCHEDULER_cancel(), and GNUNET_SCHEDULER_do_work().
struct GNUNET_SCHEDULER_FdInfo* GNUNET_SCHEDULER_Task::fds |
Information about which FDs are ready for this task (and why).
Definition at line 160 of file scheduler.c.
Referenced by destroy_task(), driver_add_multiple(), GNUNET_SCHEDULER_cancel(), GNUNET_SCHEDULER_do_work(), and init_fd_info().
struct GNUNET_SCHEDULER_FdInfo GNUNET_SCHEDULER_Task::fdx |
Storage location used for fds if we want to avoid a separate malloc() call in the common case that this task is only about a single FD.
Definition at line 167 of file scheduler.c.
Referenced by init_fd_info().
unsigned int GNUNET_SCHEDULER_Task::fds_len |
Size of the fds array.
Definition at line 172 of file scheduler.c.
Referenced by destroy_task(), driver_add_multiple(), GNUNET_SCHEDULER_do_work(), and init_fd_info().
int GNUNET_SCHEDULER_Task::own_handles |
Do we own the network and file handles referenced by the FdInfo structs in the fds array.
This will only be GNUNET_YES if the task was created by the GNUNET_SCHEDULER_add_select function.
Definition at line 179 of file scheduler.c.
Referenced by destroy_task(), and GNUNET_SCHEDULER_add_select().
struct GNUNET_TIME_Absolute GNUNET_SCHEDULER_Task::timeout |
Absolute timeout value for the task, or GNUNET_TIME_UNIT_FOREVER_ABS for "no timeout".
Definition at line 185 of file scheduler.c.
Referenced by add_without_sets(), get_timeout(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_select(), GNUNET_SCHEDULER_add_shutdown(), and GNUNET_SCHEDULER_do_work().
enum GNUNET_SCHEDULER_Reason GNUNET_SCHEDULER_Task::reason |
Why is the task ready? Set after task is added to ready queue.
Initially set to zero. All reasons that have already been satisfied (e.g. read or write ready) will be set over time.
Definition at line 199 of file scheduler.c.
Referenced by get_timeout(), GNUNET_SCHEDULER_add_with_reason_and_priority(), GNUNET_SCHEDULER_do_work(), GNUNET_SCHEDULER_shutdown(), and GNUNET_SCHEDULER_task_ready().
enum GNUNET_SCHEDULER_Priority GNUNET_SCHEDULER_Task::priority |
Task priority.
Definition at line 204 of file scheduler.c.
Referenced by add_without_sets(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_delayed_with_priority(), GNUNET_SCHEDULER_add_file_with_priority(), GNUNET_SCHEDULER_add_net_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_read_net_with_priority(), GNUNET_SCHEDULER_add_select(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), GNUNET_SCHEDULER_cancel(), GNUNET_SCHEDULER_do_work(), GNUNET_SCHEDULER_get_load(), queue_ready_task(), remove_pass_end_marker(), and set_work_priority().
int GNUNET_SCHEDULER_Task::read_fd |
Set if we only wait for reading from a single FD, otherwise -1.
Definition at line 209 of file scheduler.c.
Referenced by GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), and init_fd_info().
int GNUNET_SCHEDULER_Task::write_fd |
Set if we only wait for writing to a single FD, otherwise -1.
Definition at line 214 of file scheduler.c.
Referenced by GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), and init_fd_info().
int GNUNET_SCHEDULER_Task::lifeness |
Should the existence of this task in the queue be counted as reason to not shutdown the scheduler?
Definition at line 220 of file scheduler.c.
Referenced by add_without_sets(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_now_with_lifeness(), GNUNET_SCHEDULER_add_select(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), GNUNET_SCHEDULER_do_work(), and shutdown_if_no_lifeness().
int GNUNET_SCHEDULER_Task::on_shutdown |
Is this task run on shutdown?
Definition at line 225 of file scheduler.c.
Referenced by GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_shutdown(), and GNUNET_SCHEDULER_cancel().
int GNUNET_SCHEDULER_Task::in_ready_list |
Is this task in the ready list?
Definition at line 230 of file scheduler.c.
Referenced by GNUNET_SCHEDULER_cancel(), GNUNET_SCHEDULER_get_load(), GNUNET_SCHEDULER_task_ready(), queue_ready_task(), remove_pass_end_marker(), and set_work_priority().
struct GNUNET_AsyncScopeSave GNUNET_SCHEDULER_Task::scope |
Asynchronous scope of the task that scheduled this scope,.
Definition at line 248 of file scheduler.c.
Referenced by add_without_sets(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_select(), GNUNET_SCHEDULER_add_shutdown(), and GNUNET_SCHEDULER_do_work().