HeMPS  8.0
task_control.h
Go to the documentation of this file.
1 
17 #ifndef TASK_CONTROL_H_
18 #define TASK_CONTROL_H_
19 
20 #include "local_scheduler.h"
21 
26 typedef struct {
27  unsigned int reg[30];
28  unsigned int pc;
29  unsigned int offset;
30  int id;
31  unsigned int text_lenght;
32  unsigned int data_lenght;
33  unsigned int bss_lenght;
34  unsigned int proc_to_migrate;
35  unsigned int master_address;
36 
38 
39 } TCB;
40 
41 void init_TCBs();
42 
44 
45 TCB * searchTCB(unsigned int);
46 
47 int is_another_task_running(int app_id);
48 
49 TCB * get_tcb_index_ptr(unsigned int);
50 
51 
52 #endif /* TASK_CONTROL_BLOCK_H_ */
This structure stores variables useful to manage the task scheduling (for BE or RT) Some of the valu...
Definition: local_scheduler.h:57
TCB * get_tcb_index_ptr(unsigned int)
Definition: task_control.c:78
TCB * search_free_TCB()
Definition: task_control.c:46
int id
identifier
Definition: task_control.h:30
This structure stores information of the user's task that are running into each slave processor...
Definition: task_control.h:26
unsigned int pc
program counter
Definition: task_control.h:28
TCB * searchTCB(unsigned int)
Definition: task_control.c:63
unsigned int data_lenght
Memory DATA section lenght in bytes.
Definition: task_control.h:32
unsigned int master_address
Master address of the task.
Definition: task_control.h:35
Defines Scheduling structure. This struct is used to manages the scheduling informations relative to...
int is_another_task_running(int app_id)
Definition: task_control.c:86
unsigned int offset
initial address of the task code in page
Definition: task_control.h:29
void init_TCBs()
Definition: task_control.c:25
unsigned int proc_to_migrate
Processor to migrate the task.
Definition: task_control.h:34
unsigned int text_lenght
Memory TEXT section lenght in bytes.
Definition: task_control.h:31
Scheduling * scheduling_ptr
Scheduling structure used by task scheduler.
Definition: task_control.h:37
unsigned int bss_lenght
Memory BSS section lenght in bytes.
Definition: task_control.h:33