drake  1.0.0
src/task.c File Reference
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <drake/link.h>
#include <drake/task.h>
#include <pelib/string.h>
#include <pelib/integer.h>
#include <drake/platform.h>
#include <pelib/pair.c>
#include <pelib/iterator.c>
#include <pelib/map.c>
#include <pelib/array.c>
Include dependency graph for task.c:

Go to the source code of this file.

Defines

#define debug(var)   printf("[%s:%s:%d:CORE %zu] %s = \"%s\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_addr(var)   printf("[%s:%s:%d:CORE %zu] %s = \"%p\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_int(var)   printf("[%s:%s:%d:CORE %zu] %s = \"%d\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define debug_size_t(var)   printf("[%s:%s:%d:CORE %zu] %s = \"%zu\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)
#define PAIR_KEY_T   string
#define PAIR_VALUE_T   task_tp
#define ITERATOR_T   pair_t(string, task_tp)
#define MAP_KEY_T   string
#define MAP_VALUE_T   task_tp
#define ARRAY_T   task_tp

Functions

FILE *pelib_printf() task_tp (FILE *stream, task_tp task)
FILE *pelib_printf_detail() task_tp (FILE *stream, task_tp task, int level)
char *pelib_string() task_tp (task_tp task)
char *pelib_string_detail() task_tp (task_tp task, int level)
int pelib_compare() task_tp (task_tp a, task_tp b)
task_t *pelib_alloc() task ()
task_tp *pelib_alloc() task_tp (void *aux)
int pelib_init() task_tp (task_tp *task)
size_t pelib_fread() task_tp (task_tp *ptr, FILE *stream)
int pelib_copy() task_tp (task_tp source, task_tp *dest)
int drake_task_killed (task_tp task)
int drake_task_depleted (task_tp task)

Define Documentation

#define ARRAY_T   task_tp

Definition at line 247 of file task.c.

#define debug (   var)    printf("[%s:%s:%d:CORE %zu] %s = \"%s\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 32 of file task.c.

#define debug_addr (   var)    printf("[%s:%s:%d:CORE %zu] %s = \"%p\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 33 of file task.c.

#define debug_int (   var)    printf("[%s:%s:%d:CORE %zu] %s = \"%d\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 34 of file task.c.

#define debug_size_t (   var)    printf("[%s:%s:%d:CORE %zu] %s = \"%zu\"\n", __FILE__, __FUNCTION__, __LINE__, drake_platform_core_id(), #var, var); fflush(NULL)

Definition at line 35 of file task.c.

#define ITERATOR_T   pair_t(string, task_tp)

Definition at line 240 of file task.c.

#define MAP_KEY_T   string

Definition at line 243 of file task.c.

#define MAP_VALUE_T   task_tp

Definition at line 244 of file task.c.

#define PAIR_KEY_T   string

Definition at line 236 of file task.c.

#define PAIR_VALUE_T   task_tp

Definition at line 237 of file task.c.


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.

task_t* pelib_alloc() task ( )

Definition at line 165 of file task.c.

FILE* pelib_printf() task_tp ( FILE *  stream,
task_tp  task 
)

Definition at line 44 of file task.c.

FILE* pelib_printf_detail() task_tp ( FILE *  stream,
task_tp  task,
int  level 
)

Definition at line 56 of file task.c.

char* pelib_string() task_tp ( task_tp  task)

Definition at line 67 of file task.c.

char* pelib_string_detail() task_tp ( task_tp  task,
int  level 
)

Definition at line 95 of file task.c.

int pelib_compare() task_tp ( task_tp  a,
task_tp  b 
)

Definition at line 159 of file task.c.

task_tp* pelib_alloc() task_tp ( void *  aux)

Definition at line 171 of file task.c.

int pelib_init() task_tp ( task_tp task)

Definition at line 179 of file task.c.

size_t pelib_fread() task_tp ( task_tp ptr,
FILE *  stream 
)

Definition at line 185 of file task.c.

int pelib_copy() task_tp ( task_tp  source,
task_tp dest 
)

Definition at line 191 of file task.c.