aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_psn_edf.c
diff options
context:
space:
mode:
authorManohar Vanga <mvanga@mpi-sws.org>2012-10-03 18:30:51 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-11-27 13:50:17 -0500
commitb7012aa7edba4b88906fc39b9005ff4dae69be59 (patch)
tree5176a5e920adcb4158d67778b2cdecb1e3cdc4c0 /litmus/sched_psn_edf.c
parente99428ce6786f76b64cfea5da814a7a5cd939de3 (diff)
litmus: get rid of RT_F_SLEEP and RT_F_RUNNING
This patch removes the flags RT_F_SLEEP and RT_F_RUNNING as their name is misleading. This patch replaces them with a 'completed' field in struct rt_param. Signed-off-by: Manohar Vanga <mvanga@mpi-sws.org>
Diffstat (limited to 'litmus/sched_psn_edf.c')
-rw-r--r--litmus/sched_psn_edf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c
index 8933e15605ae..0e1675d2e572 100644
--- a/litmus/sched_psn_edf.c
+++ b/litmus/sched_psn_edf.c
@@ -60,7 +60,7 @@ static void requeue(struct task_struct* t, rt_domain_t *edf)
60 if (t->state != TASK_RUNNING) 60 if (t->state != TASK_RUNNING)
61 TRACE_TASK(t, "requeue: !TASK_RUNNING\n"); 61 TRACE_TASK(t, "requeue: !TASK_RUNNING\n");
62 62
63 set_rt_flags(t, RT_F_RUNNING); 63 tsk_rt(t)->completed = 0;
64 if (is_released(t, litmus_clock())) 64 if (is_released(t, litmus_clock()))
65 __add_ready(edf, t); 65 __add_ready(edf, t);
66 else 66 else
@@ -160,7 +160,7 @@ static void job_completion(struct task_struct* t, int forced)
160 sched_trace_task_completion(t,forced); 160 sched_trace_task_completion(t,forced);
161 TRACE_TASK(t, "job_completion().\n"); 161 TRACE_TASK(t, "job_completion().\n");
162 162
163 set_rt_flags(t, RT_F_SLEEP); 163 tsk_rt(t)->completed = 1;
164 prepare_for_next_period(t); 164 prepare_for_next_period(t);
165} 165}
166 166
@@ -214,7 +214,7 @@ static struct task_struct* psnedf_schedule(struct task_struct * prev)
214 budget_enforced(pedf->scheduled) && 214 budget_enforced(pedf->scheduled) &&
215 budget_exhausted(pedf->scheduled); 215 budget_exhausted(pedf->scheduled);
216 np = exists && is_np(pedf->scheduled); 216 np = exists && is_np(pedf->scheduled);
217 sleep = exists && get_rt_flags(pedf->scheduled) == RT_F_SLEEP; 217 sleep = exists && is_completed(pedf->scheduled);
218 preempt = edf_preemption_needed(edf, prev); 218 preempt = edf_preemption_needed(edf, prev);
219 219
220 /* If we need to preempt do so. 220 /* If we need to preempt do so.
@@ -266,7 +266,7 @@ static struct task_struct* psnedf_schedule(struct task_struct * prev)
266 266
267 if (next) { 267 if (next) {
268 TRACE_TASK(next, "scheduled at %llu\n", litmus_clock()); 268 TRACE_TASK(next, "scheduled at %llu\n", litmus_clock());
269 set_rt_flags(next, RT_F_RUNNING); 269 tsk_rt(next)->completed = 0;
270 } else { 270 } else {
271 TRACE("becoming idle at %llu\n", litmus_clock()); 271 TRACE("becoming idle at %llu\n", litmus_clock());
272 } 272 }