diff options
author | Björn Brandenburg <bbb@mpi-sws.org> | 2015-12-16 04:06:10 -0500 |
---|---|---|
committer | Björn Brandenburg <bbb@mpi-sws.org> | 2015-12-16 04:06:10 -0500 |
commit | 23c6afe9b4bb9aed98a00d0bcbf22599dd05c21e (patch) | |
tree | 23be77692d70784f3427d42119f5b33ed161eb87 | |
parent | a17f532bb1056742dc0ebbb6182bda063836316d (diff) | |
parent | 6d61224cdfc14dfb7c30136fdef4ee459d0264d1 (diff) |
Merge pull request #4 from geoffret/ctrlPageDeadlines
Expose current deadline in control page
-rw-r--r-- | include/litmus/rt_param.h | 2 | ||||
-rw-r--r-- | litmus/jobs.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 7b9a90965c25..ebbc93632c94 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. */ |
@@ -130,6 +131,7 @@ struct control_page { | |||
130 | #define LITMUS_CP_OFFSET_IRQ_COUNT 8 | 131 | #define LITMUS_CP_OFFSET_IRQ_COUNT 8 |
131 | #define LITMUS_CP_OFFSET_TS_SC_START 16 | 132 | #define LITMUS_CP_OFFSET_TS_SC_START 16 |
132 | #define LITMUS_CP_OFFSET_IRQ_SC_START 24 | 133 | #define LITMUS_CP_OFFSET_IRQ_SC_START 24 |
134 | #define LITMUS_CP_OFFSET_DEADLINE 32 | ||
133 | 135 | ||
134 | /* don't export internal data structures to user space (liblitmus) */ | 136 | /* don't export internal data structures to user space (liblitmus) */ |
135 | #ifdef __KERNEL__ | 137 | #ifdef __KERNEL__ |
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 | ||
22 | void prepare_for_next_period(struct task_struct *t) | 26 | void prepare_for_next_period(struct task_struct *t) |