[LITMUS^RT] Question about the RT_F_XXX flags

John Gamboa vaulttech at gmail.com
Mon Oct 1 20:27:41 CEST 2012


Hello,

I'm trying to write a schedule plugin. While reading the already made
scheduler plugins, I got surprised about the use of the RT_F_SLEEP and
RT_F_RUNNING.

It makes sense for me that a task is flagged with "RT_F_SLEEP" when a job
is completed and that it is flagged with "RT_F_RUNNING" in the task_new()
function. On the other hand, I don't understand why a task is flagged as
"RT_F_RUNNING" also in the task_wake_up() functions and not flagged as
"RT_F_SLEEP" when it blocks (actually, I was expecting to have other flags
for "blocked" and "awaken" in these cases). I though these were "symmetric"
functions. In fact, I am surprised that the task_block() function doesn't
make anything (only some checks) in the PSN-EDF plugin.


Also, looking at the schedule() function, I saw that more or less the same
test is normally done:

blocks = exists && !is_running(pedf->scheduled);


Why is a task flagged as "RT_F_RUNNING" when it wakes up, if this is not
tested?

I believe I'm getting something wrong anyway. I hope I can get things
clearer with your help =)


Thanks for your attention,
-- 
John Gamboa
rabanetescebolas.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20121001/371dbbed/attachment.html>


More information about the litmus-dev mailing list