drake  1.0.0
include/drake/task.h File Reference
#include <pelib/string.h>
#include <pelib/integer.h>
#include <stddef.h>
#include <pelib/structure.h>
#include <pelib/pair.h>
#include <pelib/iterator.h>
#include <pelib/map.h>
#include <pelib/array.h>
Include dependency graph for task.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  task

Defines

#define STRUCT_T   link_t
#define DONE_link_t   1
#define STRUCT_T   link_tp
#define DONE_link_tp   1
#define PAIR_KEY_T   string
#define PAIR_VALUE_T   link_tp
#define DONE_pair_string_link_tp   1
#define ITERATOR_T   pair_t(string, link_tp)
#define DONE_iterator_pair_string_link_tp   1
#define MAP_KEY_T   string
#define MAP_VALUE_T   link_tp
#define DONE_map_string_link_tp   1
#define ARRAY_T   link_tp
#define DONE_array_link_tp   1
#define STRUCT_T   cross_link_t
#define DONE_cross_link_t   1
#define STRUCT_T   cross_link_tp
#define DONE_cross_link_tp   1
#define PAIR_KEY_T   string
#define PAIR_VALUE_T   cross_link_tp
#define DONE_pair_string_cross_link_tp   1
#define ITERATOR_T   pair_t(string, cross_link_tp)
#define DONE_iterator_pair_string_cross_link_tp   1
#define MAP_KEY_T   string
#define MAP_VALUE_T   cross_link_tp
#define DONE_map_string_cross_link_tp   1
#define ARRAY_T   cross_link_tp
#define DONE_array_cross_link_tp   1
#define STRUCT_T   task_t
#define DONE_task_t   1
#define STRUCT_T   task_tp
#define DONE_task_tp   1
#define PAIR_KEY_T   string
#define PAIR_VALUE_T   task_tp
#define DONE_pair_string_task_tp   1
#define ITERATOR_T   pair_t(string, task_tp)
#define DONE_iterator_string_task_tp   1
#define MAP_KEY_T   string
#define MAP_VALUE_T   task_tp
#define DONE_map_string_task_tp   1
#define ARRAY_T   task_tp
#define DONE_array_task_tp   1

Typedefs

typedef enum task_status task_status_t
typedef unsigned int task_id
typedef struct link link_t
typedef link_tlink_tp
typedef struct cross_link cross_link_t
typedef cross_link_tcross_link_tp
typedef struct processor processor_t
typedef struct task task_t
 Space-less type alias for struct task.
typedef struct tasktask_tp
 Symbol-less type alias for pointer to task_t.

Enumerations

enum  task_status {
  TASK_INVALID, TASK_INIT, TASK_START, TASK_RUN,
  TASK_KILLED, TASK_ZOMBIE, TASK_DESTROY
}

Functions

int drake_task_depleted (task_tp task)
int drake_task_killed (task_tp task)

Define Documentation

#define ARRAY_T   link_tp

Defines arrays for pointers to tasks

Definition at line 182 of file task.h.

#define ARRAY_T   cross_link_tp

Defines arrays for pointers to tasks

Definition at line 182 of file task.h.

#define ARRAY_T   task_tp

Defines arrays for pointers to tasks

Definition at line 182 of file task.h.

#define DONE_array_cross_link_tp   1

Definition at line 105 of file task.h.

#define DONE_array_link_tp   1

Definition at line 69 of file task.h.

#define DONE_array_task_tp   1

Definition at line 184 of file task.h.

#define DONE_cross_link_t   1

Definition at line 81 of file task.h.

#define DONE_cross_link_tp   1

Definition at line 86 of file task.h.

Definition at line 95 of file task.h.

Definition at line 59 of file task.h.

Definition at line 174 of file task.h.

#define DONE_link_t   1

Definition at line 45 of file task.h.

#define DONE_link_tp   1

Definition at line 50 of file task.h.

Definition at line 101 of file task.h.

#define DONE_map_string_link_tp   1

Definition at line 65 of file task.h.

#define DONE_map_string_task_tp   1

Definition at line 179 of file task.h.

Definition at line 91 of file task.h.

#define DONE_pair_string_link_tp   1

Definition at line 55 of file task.h.

#define DONE_pair_string_task_tp   1

Definition at line 170 of file task.h.

#define DONE_task_t   1

Definition at line 160 of file task.h.

#define DONE_task_tp   1

Definition at line 165 of file task.h.

#define ITERATOR_T   pair_t(string, link_tp)

Definition at line 172 of file task.h.

#define ITERATOR_T   pair_t(string, cross_link_tp)

Definition at line 172 of file task.h.

#define ITERATOR_T   pair_t(string, task_tp)

Definition at line 172 of file task.h.

#define MAP_KEY_T   string

Defines arrays for pointers to link

Defines arrays for pointers to cross link

Definition at line 176 of file task.h.

#define MAP_KEY_T   string

Defines arrays for pointers to link

Defines arrays for pointers to cross link

Definition at line 176 of file task.h.

#define MAP_KEY_T   string

Defines arrays for pointers to link

Defines arrays for pointers to cross link

Definition at line 176 of file task.h.

#define MAP_VALUE_T   link_tp

Definition at line 177 of file task.h.

#define MAP_VALUE_T   cross_link_tp

Definition at line 177 of file task.h.

#define MAP_VALUE_T   task_tp

Definition at line 177 of file task.h.

#define PAIR_KEY_T   string

Definition at line 167 of file task.h.

#define PAIR_KEY_T   string

Definition at line 167 of file task.h.

#define PAIR_KEY_T   string

Definition at line 167 of file task.h.

#define PAIR_VALUE_T   link_tp

Definition at line 168 of file task.h.

Definition at line 168 of file task.h.

#define PAIR_VALUE_T   task_tp

Definition at line 168 of file task.h.

#define STRUCT_T   link_t

Generate pelib objects from link structure

Generate pelib objects from pointer to link

Generate pelib objects from cross-link structure

Generate pelib objects from pointer to cross link

Generate pelib objects from task structure

Generate pelib objects from pointer to task structure

Definition at line 163 of file task.h.

#define STRUCT_T   link_tp

Generate pelib objects from link structure

Generate pelib objects from pointer to link

Generate pelib objects from cross-link structure

Generate pelib objects from pointer to cross link

Generate pelib objects from task structure

Generate pelib objects from pointer to task structure

Definition at line 163 of file task.h.

#define STRUCT_T   cross_link_t

Generate pelib objects from link structure

Generate pelib objects from pointer to link

Generate pelib objects from cross-link structure

Generate pelib objects from pointer to cross link

Generate pelib objects from task structure

Generate pelib objects from pointer to task structure

Definition at line 163 of file task.h.

#define STRUCT_T   cross_link_tp

Generate pelib objects from link structure

Generate pelib objects from pointer to link

Generate pelib objects from cross-link structure

Generate pelib objects from pointer to cross link

Generate pelib objects from task structure

Generate pelib objects from pointer to task structure

Definition at line 163 of file task.h.

#define STRUCT_T   task_t

Generate pelib objects from link structure

Generate pelib objects from pointer to link

Generate pelib objects from cross-link structure

Generate pelib objects from pointer to cross link

Generate pelib objects from task structure

Generate pelib objects from pointer to task structure

Definition at line 163 of file task.h.

#define STRUCT_T   task_tp

Generate pelib objects from link structure

Generate pelib objects from pointer to link

Generate pelib objects from cross-link structure

Generate pelib objects from pointer to cross link

Generate pelib objects from task structure

Generate pelib objects from pointer to task structure

Definition at line 163 of file task.h.


Typedef Documentation

typedef struct cross_link cross_link_t

Space-less type alias for struct cross

Definition at line 74 of file task.h.

Symbol-less type alias for pointer to cross-link

Definition at line 76 of file task.h.

typedef struct link link_t

Space-less type alias for struct link

Definition at line 38 of file task.h.

typedef link_t* link_tp

Symbol-less type alias for pointer to link

Definition at line 40 of file task.h.

typedef struct processor processor_t

Space-less type alias for struct processor

Definition at line 110 of file task.h.

typedef unsigned int task_id

Type of a simple task id

Definition at line 33 of file task.h.

typedef enum task_status task_status_t

Space-less alias for enum_task_status

Definition at line 30 of file task.h.

typedef struct task task_t

Space-less type alias for struct task.

Definition at line 153 of file task.h.

typedef struct task* task_tp

Symbol-less type alias for pointer to task_t.

Definition at line 155 of file task.h.


Enumeration Type Documentation

Possible state of a task

Enumerator:
TASK_INVALID 
TASK_INIT 
TASK_START 
TASK_RUN 
TASK_KILLED 
TASK_ZOMBIE 
TASK_DESTROY 

Definition at line 28 of file task.h.


Function Documentation

Return 0 of there is at least one element left in any input link of the task, or if at least one producer is still working. Return the value computed by this function in the work function of a task to terminate it as soon as it has no more data to process.

Definition at line 215 of file task.c.

int drake_task_killed ( task_tp  task)

Definition at line 209 of file task.c.