From d2f58ddbfb1dd4fb1b6ff0bebbd886b1dcf5af34 Mon Sep 17 00:00:00 2001 From: Namhoon Kim Date: Mon, 25 Nov 2013 17:16:38 -0500 Subject: First draft of C-FL-split --- include/litmus/edf_split_common.h | 25 +++++++++++++++++++++++++ include/litmus/litmus.h | 1 + include/litmus/rt_param.h | 4 +++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 include/litmus/edf_split_common.h (limited to 'include') 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 @@ +/* + * EDF common data structures and utility functions shared by all EDF + * based scheduler plugins + */ + +/* CLEANUP: Add comments and make it less messy. + * + */ + +#ifndef __UNC_EDF_SPLIT_COMMON_H__ +#define __UNC_EDF_SPLIT_COMMON_H__ + +#include + +void edf_split_domain_init(rt_domain_t* rt, check_resched_needed_t resched, + release_jobs_t release); + +int edf_split_higher_prio(struct task_struct* first, + struct task_struct* second); + +int edf_split_ready_order(struct bheap_node* a, struct bheap_node* b); + +int edf_split_preemption_needed(rt_domain_t* rt, struct task_struct *t); + +#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); #define get_deadline(t) (tsk_rt(t)->job_params.deadline) #define get_release(t) (tsk_rt(t)->job_params.release) #define get_lateness(t) (tsk_rt(t)->job_params.lateness) +#define is_in_crit_section(t) (tsk_rt(t)->in_crit_section) /* release policy macros */ #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 { lt_t period; lt_t relative_deadline; lt_t phase; + int split; unsigned int cpu; unsigned int priority; task_class_t cls; @@ -143,6 +144,8 @@ struct rt_job { lt_t release; /* What is the current deadline? */ lt_t deadline; + /* What is the dealine of the current subjob under splitting? */ + lt_t subjob_deadline; /* How much service has this job received so far? */ lt_t exec_time; @@ -191,7 +194,6 @@ struct rt_param { unsigned int priority_boosted:1; /* If so, when did this start? */ lt_t boost_start_time; - /* How many LITMUS^RT locks does the task currently hold/wait for? */ unsigned int num_locks_held; /* How many PCP/SRP locks does the task currently hold/wait for? */ -- cgit v1.2.2