HeMPS  8.0
Functions | Variables
applications.c File Reference

Implements the function to manage a insertion, accessing, and remotion of an applications structure This modules is only used by manager kernel. More...

#include "applications.h"
#include "utils.h"
Include dependency graph for applications.c:

Functions

Applicationget_application_ptr (int app_id)
 
Taskget_task_ptr (Application *app, int task_id)
 
Applicationget_next_pending_app ()
 
int set_task_allocated (Application *app, int task_id)
 
void set_task_terminated (Application *app, int task_id)
 
void set_task_migrating (int task_id)
 
void set_task_migrated (int task_id, int new_proc)
 
Applicationread_and_create_application (unsigned int app_id, volatile unsigned int *ref_address)
 
void remove_application (int app_id)
 
void initialize_applications ()
 

Variables

Application applications [MAX_CLUSTER_APP]
 Store the applications informations, is equivalent to a attribute in OO paradigm.
 

Detailed Description

Implements the function to manage a insertion, accessing, and remotion of an applications structure This modules is only used by manager kernel.

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

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
Task* get_task_ptr ( Application app,
int  task_id 
)

Searches for a Task pointer into an Application instance. If not found, the kernel entering in a error situation

Parameters
appWanted Application pointer
Returns
Task 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