HeMPS  8.0
processors.h
Go to the documentation of this file.
1 
17 #ifndef PROCESSOR_H_
18 #define PROCESSOR_H_
19 
20 #include "../../include/kernel_pkg.h"
21 
25 typedef struct {
26  int address;
27  int free_pages;
28  int slack_time;
29  unsigned int total_slack_samples;
30  int task[MAX_LOCAL_TASKS];
31 } Processor;
32 
33 void init_procesors();
34 
35 void update_proc_slack_time(int, int);
36 
37 int get_proc_slack_time(int);
38 
39 void add_procesor(int);
40 
41 void add_task(int, int);
42 
43 void remove_task(int, int);
44 
45 int get_proc_free_pages(int);
46 
47 int get_proc_address(int);
48 
49 int get_task_location(int);
50 
51 
52 
53 #endif /* PROCESSOR_H_ */
void add_procesor(int)
Definition: processors.c:78
int slack_time
Slack time (idle time), represented in percentage.
Definition: processors.h:28
void remove_task(int, int)
Definition: processors.c:136
unsigned int total_slack_samples
Number of slack time samples.
Definition: processors.h:29
int get_proc_address(int)
Definition: processors.c:41
int address
Processor address in XY.
Definition: processors.h:26
int free_pages
Number of free memory pages.
Definition: processors.h:27
This structure store variables used to manage the processors attributed by the kernel master...
Definition: processors.h:25
int get_task_location(int)
Definition: processors.c:174
int get_proc_slack_time(int)
Definition: processors.c:64
int get_proc_free_pages(int)
Definition: processors.c:162
void add_task(int, int)
Definition: processors.c:100
void init_procesors()
Definition: processors.c:197
void update_proc_slack_time(int, int)
Definition: processors.c:50