HeMPS  8.0
Functions | Variables
task_control.c File Reference

This module implements function relative to task control block (TCB) This module is used by the slave kernel. More...

#include "task_control.h"
#include "../../include/kernel_pkg.h"
#include "utils.h"
Include dependency graph for task_control.c:

Functions

void init_TCBs ()
 
TCBsearch_free_TCB ()
 
TCBsearchTCB (unsigned int task_id)
 
TCBget_tcb_index_ptr (unsigned int i)
 
int is_another_task_running (int app_id)
 

Variables

TCB tcbs [MAX_LOCAL_TASKS]
 Local task TCB array.
 

Detailed Description

This module implements function relative to task control block (TCB) This module is used by the slave 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

TCB* get_tcb_index_ptr ( unsigned int  i)

Gets the TCB pointer from a index

Parameters
iIndex of TCB
Returns
The respective TCB pointer
void init_TCBs ( )

Initializes TCB array

int is_another_task_running ( int  app_id)

Test if there is another task of the same application running in the same slave processor

Parameters
app_idAppliation ID
Returns
1 - if YES, 0 if NO
TCB* search_free_TCB ( )

Search from a tcb position with status equal to FREE

Returns
The TCB pointer or 0 in a ERROR situation
TCB* searchTCB ( unsigned int  task_id)

Search by a TCB

Parameters
task_idTask ID to be searched
Returns
TCB pointer