SimGrid  3.9.90
Versatile Simulation of Distributed Systems
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Tasks dependencies

Functions for managing the task dependencies. More...

Functions

void SD_task_dependency_add (const char *name, void *data, SD_task_t src, SD_task_t dst)
 Adds a dependency between two tasks. More...
 
void SD_task_dependency_remove (SD_task_t src, SD_task_t dst)
 Remove a dependency between two tasks. More...
 
const char * SD_task_dependency_get_name (SD_task_t src, SD_task_t dst)
 Returns the name given as input when dependency has been created.. More...
 
void * SD_task_dependency_get_data (SD_task_t src, SD_task_t dst)
 Returns the user data associated with a dependency between two tasks. More...
 
int SD_task_dependency_exists (SD_task_t src, SD_task_t dst)
 Indicates whether there is a dependency between two tasks. More...
 

Detailed Description

Functions for managing the task dependencies.

This section describes the functions for managing the dependencies between the tasks.

See Also
Tasks

Function Documentation

void SD_task_dependency_add ( const char *  name,
void *  data,
SD_task_t  src,
SD_task_t  dst 
)

Adds a dependency between two tasks.

dst will depend on src, ie dst will not start before src is finished. Their state must be SD_NOT_SCHEDULED, SD_SCHEDULED or SD_RUNNABLE.

Parameters
namethe name of the new dependency (can be NULL)
datathe user data you want to associate with this dependency (can be NULL)
srcthe task which must be executed first
dstthe task you want to make depend on src
See Also
SD_task_dependency_remove()
void SD_task_dependency_remove ( SD_task_t  src,
SD_task_t  dst 
)

Remove a dependency between two tasks.

Parameters
srca task
dsta task depending on src
See Also
SD_task_dependency_add()
const char* SD_task_dependency_get_name ( SD_task_t  src,
SD_task_t  dst 
)

Returns the name given as input when dependency has been created..

Parameters
srca task
dsta task depending on src
void* SD_task_dependency_get_data ( SD_task_t  src,
SD_task_t  dst 
)

Returns the user data associated with a dependency between two tasks.

Parameters
srca task
dsta task depending on src
Returns
the user data associated with this dependency (can be NULL)
See Also
SD_task_dependency_add()
int SD_task_dependency_exists ( SD_task_t  src,
SD_task_t  dst 
)

Indicates whether there is a dependency between two tasks.

Parameters
srca task
dsta task depending on src

If src is NULL, checks whether dst has any pre-dependency. If dst is NULL, checks whether src has any post-dependency.