HeMPS  8.0
Classes | Macros | Functions
task_location.h File Reference

This module defines function relative to task location structure. The TaskLocation structure is defined, this structure stores the location (slave process address) of the other task. More...

#include "../../include/kernel_pkg.h"
Include dependency graph for task_location.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TaskLocaion
 This structure stores the location (slave process address) of the other task. More...
 

Macros

#define MAX_TASK_LOCATION   (MAX_LOCAL_TASKS*MAX_TASKS_APP)
 

Functions

void init_task_location ()
 
int get_task_location (int)
 
void add_task_location (int, int)
 
int remove_task_location (int)
 
void clear_app_tasks_locations (int)
 

Detailed Description

This module defines function relative to task location structure. The TaskLocation structure is defined, this structure stores the location (slave process address) of the other task.

HEMPS VERSION - 8.0 - support for RT applications

Distribution: June 2016

Created by: Marcelo Ruaro - contact: marce.nosp@m.lo.r.nosp@m.uaro@.nosp@m.acad.nosp@m..pucr.nosp@m.s.br

Research group: GAPH-PUCRS - contact: ferna.nosp@m.ndo..nosp@m.morae.nosp@m.s@pu.nosp@m.crs.b.nosp@m.r

Function Documentation

void add_task_location ( int  task_ID,
int  proc 
)

Add a task_locaiton instance

Parameters
task_IDTask ID
procLocation (address) of the task
void clear_app_tasks_locations ( int  app_ID)

Clear/remove all task of the same application

Parameters
app_IDApplication ID
int get_task_location ( int  task_ID)

Searches for a task location by walking for all processors within processors' array

Parameters
task_idTask ID
Returns
The task location, i.e., the processor address that the task is allocated

Searches for the location of a given task

Parameters
task_IDThe ID of the task
Returns
The task location (processor address in XY)
void init_task_location ( )

Initializes task_location array with invalid values

int remove_task_location ( int  task_id)

Remove a task_locaton instance

Parameters
task_idTask ID of the instance to be removed
Returns
The location of the removed task, -1 if ERROR