HeMPS  8.0
local_scheduler.h
Go to the documentation of this file.
1 
35 #ifndef LOCAL_SCHEDULER_H_
36 #define LOCAL_SCHEDULER_H_
37 
38 //Task scheduling status
39 #define FREE -1
40 #define READY 0
41 #define WAITING 1
42 #define RUNNING 2
43 #define MIGRATING 3
44 #define BLOCKED 4
45 #define SLEEPING 5
46 
47 
48 //Auxiliary RT defines
49 #define DEBUG 0
50 #define NO_DEADLINE -1
51 #define MAX_TIME_SLICE 16318
52 
53 
57 typedef struct {
58 
59  int status;
60  unsigned int execution_time;
61  unsigned int period;
62  int deadline;
63  unsigned int ready_time;
65  unsigned int slack_time;
66  unsigned int running_start_time;
67  unsigned int utilization;
68 
69  unsigned int tcb_ptr;
70 
71 } Scheduling;
72 
73 
74 void real_time_task(Scheduling *, unsigned int, int, unsigned int);
75 
76 unsigned int get_time_slice();
77 
78 void init_scheduling_ptr(Scheduling **, int);
79 
81 
82 Scheduling * LST(unsigned int);
83 
84 
85 #endif /* LOCAL_SCHEDULER_H_ */
Scheduling * LST(unsigned int)
Definition: local_scheduler.c:318
This structure stores variables useful to manage the task scheduling (for BE or RT) Some of the valu...
Definition: local_scheduler.h:57
unsigned int utilization
Task CPU utilization in percentage.
Definition: local_scheduler.h:67
unsigned int running_start_time
Task running start time in clock cycles.
Definition: local_scheduler.h:66
int deadline
Task deadline in clock cycles, for BE task is set to -1.
Definition: local_scheduler.h:62
unsigned int slack_time
Task slack time in clock cycles.
Definition: local_scheduler.h:65
unsigned int get_time_slice()
Definition: local_scheduler.c:55
void init_scheduling_ptr(Scheduling **, int)
Definition: local_scheduler.c:63
void clear_scheduling(Scheduling *)
Definition: local_scheduler.c:77
unsigned int ready_time
Time in clock cycles that task becomes ready.
Definition: local_scheduler.h:63
int status
Task scheduling status.
Definition: local_scheduler.h:59
unsigned int period
Task period in clock cycles.
Definition: local_scheduler.h:61
unsigned int execution_time
Task execution time in clock cycles.
Definition: local_scheduler.h:60
void real_time_task(Scheduling *, unsigned int, int, unsigned int)
Definition: local_scheduler.c:130
unsigned int tcb_ptr
Pointer for the respective task TCB into kernel slave.
Definition: local_scheduler.h:69
int remaining_exec_time
Task remaining execution time in clock cycles.
Definition: local_scheduler.h:64