diff options
| author | Namhoon Kim <namhoonk@ludwig.cs.unc.edu> | 2013-11-25 17:16:38 -0500 |
|---|---|---|
| committer | Namhoon Kim <namhoonk@ludwig.cs.unc.edu> | 2013-11-25 17:16:38 -0500 |
| commit | d2f58ddbfb1dd4fb1b6ff0bebbd886b1dcf5af34 (patch) | |
| tree | 962fdfb5344956d341adcfc20508adb14437acbc /include | |
| parent | bcaacec1ca714224807728a63eccb37e3d685cd6 (diff) | |
First draft of C-FL-splitwip-pgm-split
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus/edf_split_common.h | 25 | ||||
| -rw-r--r-- | include/litmus/litmus.h | 1 | ||||
| -rw-r--r-- | include/litmus/rt_param.h | 4 |
3 files changed, 29 insertions, 1 deletions
diff --git a/include/litmus/edf_split_common.h b/include/litmus/edf_split_common.h new file mode 100644 index 000000000000..4e7c0ce23c9d --- /dev/null +++ b/include/litmus/edf_split_common.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * EDF common data structures and utility functions shared by all EDF | ||
| 3 | * based scheduler plugins | ||
| 4 | */ | ||
| 5 | |||
| 6 | /* CLEANUP: Add comments and make it less messy. | ||
| 7 | * | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __UNC_EDF_SPLIT_COMMON_H__ | ||
| 11 | #define __UNC_EDF_SPLIT_COMMON_H__ | ||
| 12 | |||
| 13 | #include <litmus/rt_domain.h> | ||
| 14 | |||
| 15 | void edf_split_domain_init(rt_domain_t* rt, check_resched_needed_t resched, | ||
| 16 | release_jobs_t release); | ||
| 17 | |||
| 18 | int edf_split_higher_prio(struct task_struct* first, | ||
| 19 | struct task_struct* second); | ||
| 20 | |||
| 21 | int edf_split_ready_order(struct bheap_node* a, struct bheap_node* b); | ||
| 22 | |||
| 23 | int edf_split_preemption_needed(rt_domain_t* rt, struct task_struct *t); | ||
| 24 | |||
| 25 | #endif | ||
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h index e35c38c4c0a2..8bd9ab2258da 100644 --- a/include/litmus/litmus.h +++ b/include/litmus/litmus.h | |||
| @@ -69,6 +69,7 @@ void litmus_exit_task(struct task_struct *tsk); | |||
| 69 | #define get_deadline(t) (tsk_rt(t)->job_params.deadline) | 69 | #define get_deadline(t) (tsk_rt(t)->job_params.deadline) |
| 70 | #define get_release(t) (tsk_rt(t)->job_params.release) | 70 | #define get_release(t) (tsk_rt(t)->job_params.release) |
| 71 | #define get_lateness(t) (tsk_rt(t)->job_params.lateness) | 71 | #define get_lateness(t) (tsk_rt(t)->job_params.lateness) |
| 72 | #define is_in_crit_section(t) (tsk_rt(t)->in_crit_section) | ||
| 72 | 73 | ||
| 73 | /* release policy macros */ | 74 | /* release policy macros */ |
| 74 | #define is_periodic(t) (get_release_policy(t) == TASK_PERIODIC) | 75 | #define is_periodic(t) (get_release_policy(t) == TASK_PERIODIC) |
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 138799fbaad7..65798427d5c3 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
| @@ -76,6 +76,7 @@ struct rt_task { | |||
| 76 | lt_t period; | 76 | lt_t period; |
| 77 | lt_t relative_deadline; | 77 | lt_t relative_deadline; |
| 78 | lt_t phase; | 78 | lt_t phase; |
| 79 | int split; | ||
| 79 | unsigned int cpu; | 80 | unsigned int cpu; |
| 80 | unsigned int priority; | 81 | unsigned int priority; |
| 81 | task_class_t cls; | 82 | task_class_t cls; |
| @@ -143,6 +144,8 @@ struct rt_job { | |||
| 143 | lt_t release; | 144 | lt_t release; |
| 144 | /* What is the current deadline? */ | 145 | /* What is the current deadline? */ |
| 145 | lt_t deadline; | 146 | lt_t deadline; |
| 147 | /* What is the dealine of the current subjob under splitting? */ | ||
| 148 | lt_t subjob_deadline; | ||
| 146 | 149 | ||
| 147 | /* How much service has this job received so far? */ | 150 | /* How much service has this job received so far? */ |
| 148 | lt_t exec_time; | 151 | lt_t exec_time; |
| @@ -191,7 +194,6 @@ struct rt_param { | |||
| 191 | unsigned int priority_boosted:1; | 194 | unsigned int priority_boosted:1; |
| 192 | /* If so, when did this start? */ | 195 | /* If so, when did this start? */ |
| 193 | lt_t boost_start_time; | 196 | lt_t boost_start_time; |
| 194 | |||
| 195 | /* How many LITMUS^RT locks does the task currently hold/wait for? */ | 197 | /* How many LITMUS^RT locks does the task currently hold/wait for? */ |
| 196 | unsigned int num_locks_held; | 198 | unsigned int num_locks_held; |
| 197 | /* How many PCP/SRP locks does the task currently hold/wait for? */ | 199 | /* How many PCP/SRP locks does the task currently hold/wait for? */ |
