[LITMUS^RT] question about cedf_task_wakeup()
Glenn Elliott
gelliott at cs.unc.edu
Mon Jan 21 19:13:54 CET 2013
Hello All,
I am looking at some code in sched_cedf.c::cedf_task_wakeup(). There is an if-statement that conditionally clears the rt_params 'completed' flag (https://github.com/LITMUS-RT/litmus-rt/blob/master/litmus/sched_cedf.c#L605).
if (task->rt.time_slice) {
/* came back in time before deadline */
tsk_rt(task)->completed = 0;
}
What was the intent of the condition on the value of 'time_slice'? What do we expect to happen if 'time_slice' is zero? Can it ever be zero?
I'm just curious. I am only wondering if this is dead code. (In fact, I'm not entirely sure clearing 'completed' is necessary since the 'is_tardy()' condition checked earlier in code, I think, ensures that the waking up task is not starting a new job when 'completed' is cleared, so 'completed' would already have to be false.)
-Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20130121/b1e2c6fb/attachment.html>
More information about the litmus-dev
mailing list