GNUnet  0.10.x
Data Fields
GNUNET_SCHEDULER_Task Struct Reference

Entry in list of pending tasks. More...

Collaboration diagram for GNUNET_SCHEDULER_Task:
[legend]

Data Fields

struct GNUNET_SCHEDULER_Tasknext
 This is a linked list. More...
 
struct GNUNET_SCHEDULER_Taskprev
 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_FdInfofds
 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...
 

Detailed Description

Entry in list of pending tasks.

Definition at line 134 of file scheduler.c.

Field Documentation

◆ next

struct GNUNET_SCHEDULER_Task* GNUNET_SCHEDULER_Task::next

◆ prev

struct GNUNET_SCHEDULER_Task* GNUNET_SCHEDULER_Task::prev

This is a linked list.

Definition at line 144 of file scheduler.c.

Referenced by GNUNET_SCHEDULER_add_at_with_priority().

◆ callback

GNUNET_SCHEDULER_TaskCallback GNUNET_SCHEDULER_Task::callback

◆ callback_cls

void* GNUNET_SCHEDULER_Task::callback_cls

◆ fds

struct GNUNET_SCHEDULER_FdInfo* GNUNET_SCHEDULER_Task::fds

Information about which FDs are ready for this task (and why).

Definition at line 159 of file scheduler.c.

Referenced by destroy_task(), driver_add_multiple(), GNUNET_SCHEDULER_cancel(), GNUNET_SCHEDULER_do_work(), and init_fd_info().

◆ fdx

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 166 of file scheduler.c.

Referenced by init_fd_info().

◆ fds_len

unsigned int GNUNET_SCHEDULER_Task::fds_len

Size of the fds array.

Definition at line 171 of file scheduler.c.

Referenced by destroy_task(), driver_add_multiple(), GNUNET_SCHEDULER_do_work(), and init_fd_info().

◆ own_handles

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 178 of file scheduler.c.

Referenced by destroy_task(), and GNUNET_SCHEDULER_add_select().

◆ timeout

struct GNUNET_TIME_Absolute GNUNET_SCHEDULER_Task::timeout

◆ reason

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 (i.e. read or write ready) will be set over time.

Definition at line 198 of file scheduler.c.

Referenced by GNUNET_SCHEDULER_add_with_reason_and_priority(), GNUNET_SCHEDULER_do_work(), GNUNET_SCHEDULER_shutdown(), and GNUNET_SCHEDULER_task_ready().

◆ priority

enum GNUNET_SCHEDULER_Priority GNUNET_SCHEDULER_Task::priority

◆ read_fd

int GNUNET_SCHEDULER_Task::read_fd

Set if we only wait for reading from a single FD, otherwise -1.

Definition at line 208 of file scheduler.c.

Referenced by GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), and init_fd_info().

◆ write_fd

int GNUNET_SCHEDULER_Task::write_fd

Set if we only wait for writing to a single FD, otherwise -1.

Definition at line 213 of file scheduler.c.

Referenced by GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_add_with_reason_and_priority(), and init_fd_info().

◆ lifeness

int GNUNET_SCHEDULER_Task::lifeness

◆ on_shutdown

int GNUNET_SCHEDULER_Task::on_shutdown

Is this task run on shutdown?

Definition at line 224 of file scheduler.c.

Referenced by GNUNET_SCHEDULER_add_shutdown(), and GNUNET_SCHEDULER_cancel().

◆ in_ready_list

int GNUNET_SCHEDULER_Task::in_ready_list

Is this task in the ready list?

Definition at line 229 of file scheduler.c.

Referenced by GNUNET_SCHEDULER_cancel(), GNUNET_SCHEDULER_task_ready(), and queue_ready_task().

◆ scope

struct GNUNET_AsyncScopeSave GNUNET_SCHEDULER_Task::scope

Asynchronous scope of the task that scheduled this scope,.

Definition at line 247 of file scheduler.c.

Referenced by add_without_sets(), GNUNET_SCHEDULER_add_at_with_priority(), GNUNET_SCHEDULER_add_select(), GNUNET_SCHEDULER_add_shutdown(), and GNUNET_SCHEDULER_do_work().


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