aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoffrey <geoffret@usc.edu>2015-12-08 19:04:58 -0500
committerGeoffrey <geoffret@usc.edu>2015-12-08 19:04:58 -0500
commit0ccca2efed878ed7ebdda8aa546925dc7fcb7335 (patch)
tree84478679799003372f7efb570855e8c9b100dba4
parenta17f532bb1056742dc0ebbb6182bda063836316d (diff)
Adds deadline field to control page and updates it when setting up jobs for release.
-rw-r--r--include/litmus/rt_param.h1
-rw-r--r--litmus/jobs.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 7b9a90965c25..4bfd59f82c94 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -122,6 +122,7 @@ struct control_page {
122 * started. */ 122 * started. */
123 123
124 /* to be extended */ 124 /* to be extended */
125 lt_t deadline; /* Deadline for the currently executing job */
125}; 126};
126 127
127/* Expected offsets within the control page. */ 128/* Expected offsets within the control page. */
diff --git a/litmus/jobs.c b/litmus/jobs.c
index 0dd36b9343d6..3f1cb0e2327e 100644
--- a/litmus/jobs.c
+++ b/litmus/jobs.c
@@ -17,6 +17,10 @@ static inline void setup_release(struct task_struct *t, lt_t release)
17 17
18 /* update job sequence number */ 18 /* update job sequence number */
19 t->rt_param.job_params.job_no++; 19 t->rt_param.job_params.job_no++;
20
21 /* add the deadline to */
22 if(has_control_page(t))
23 get_control_page(t)->deadline = t->rt_param.job_params.deadline;
20} 24}
21 25
22void prepare_for_next_period(struct task_struct *t) 26void prepare_for_next_period(struct task_struct *t)