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

Defines structures Application, Task, and Dependence. More...

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

Go to the source code of this file.

Classes

struct  Dependence
 This structure stores the communication dependences of a given task This structure is fulfilled by the kernel master during the reception of a new application. Thus, the application repository keeps the dependence information for each task. More...
 
struct  Task
 This structure stores variables useful to manage a task from a manager kernel perspective Some of the values are loaded from repository others, changed at runtime. More...
 
struct  Application
 This structure store variables useful to the kernel master manage an application instance. More...
 

Macros

#define RUNNING   1
 Signals that the application have all its task mapped and the task already has been requested.
 
#define FREE   2
 Signals that all task of the application finishes.
 
#define WAITING_RECLUSTERING   3
 Signals that the application have at least one task waiting for reclustering.
 
#define READY_TO_LOAD   4
 Signals that the application have all its task mapped but the task not were requested yet.
 
#define REQUESTED   0
 Signals that the task has already requested to the global master.
 
#define ALLOCATED   1
 Signals that the task has successfully allocated into a processor.
 
#define TASK_RUNNING   2
 Signals that the task is running on the processor.
 
#define TERMINATED_TASK   3
 Signals that the task terminated its execution.
 
#define MIGRATING   4
 Signals that the task was set to be migrated on the slave kernel.
 
#define MAX_TASK_DEPENDECES   10
 Stores maximum number of dependences task that a task can have.
 

Functions

Applicationget_application_ptr (int)
 
Applicationget_next_pending_app ()
 
int set_task_allocated (Application *, int)
 
void set_task_terminated (Application *, int)
 
void set_task_migrating (int)
 
void set_task_migrated (int, int)
 
unsigned int get_app_id_counter ()
 
Applicationread_and_create_application (unsigned int, volatile unsigned int *)
 
void remove_application (int)
 
void initialize_applications ()
 

Detailed Description

Defines structures Application, Task, and Dependence.

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

The Application structure is useful to the kernel_master to manage the applications' information. This structure is also composed of the substructures: Task and Dependece. Task stores the specific information of each applications's task Dependence stores the task communication dependence information.

Function Documentation

Application* get_application_ptr ( int  app_id)

Receives and app ID and return the Application pointer for the required app ID. If not found, the kernel entering in a error situation

Parameters
app_idID of the application
Returns
Pointer for Application
Application* get_next_pending_app ( )

Get the oldest application waiting reclustering

Returns
Selected Application pointer
int set_task_allocated ( Application app,
int  task_id 
)

Set a task status as allocated and verifies the number of allocated task for the application

Parameters
appApplication pointer of the task
task_idID of the allocated task
Returns
The number of allocated task for the application
void set_task_migrated ( int  task_id,
int  new_proc 
)

Set a task status as migrated

Parameters
appApplication pointer of the task
task_idID of the migrated task
void set_task_migrating ( int  task_id)

Set a task status as migrating

Parameters
appApplication pointer of the task
task_idID of the migrating task
void set_task_terminated ( Application app,
int  task_id 
)

Set a task status as terminated

Parameters
appApplication pointer of the task
task_idID of the terminated task