<div class="gmail_quote">2012/10/1 Jonathan Herman <span dir="ltr"><<a href="mailto:hermanjl@cs.unc.edu" target="_blank">hermanjl@cs.unc.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi John,<br></blockquote><div><br>Hi. Thanks for the quick answer!<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
There is some term overloading going on here which causes confusion.<br>
The is_running() macro does not refer to RT_F_RUNNING, nor is the<br>
task_wake_up() call invoked when a task should go from RT_F_SLEEP to<br>
RUNNING. RT_F_SLEEP is unrelated to blocking / waking up from<br>
blocking.<br>
<br>
As I see it, RT_F_SLEEP refers to tasks which should not be run<br>
because they have completed their current job. Its only purpose is to<br>
allow the complete_job() method (called from userspace) to mark a job<br>
as "completed". This way, the subsequent call to psn_edf_schedule()<br>
can prepare the job for its next period and arm any appropriate<br>
timers.<br></blockquote><div><br>Yes. I see it. That's why I suggested (or, actually, was expecting) some flags for "blocked" and "woken up", which would be set at task_block() and task_wake_up(), respectively. Then I could test if a task is running and blocked with something like "get_rt_flags(t) == (RT_F_RUNNING | RT_F_BLOCKED)".<br>
<br>Although I feel that creating these flags (say, "RT_F_BLOCKED" and
"RT_F_WOKEN_UP") there in my code wouldn't create any mess, I believe that
the code is the way it is now for some reason. Supposing that a possible reason could be: the Linux kernel already provides a way to verify if a task is blocked or woken up (at least, for me, it is what is seems), then should I consider the "is_running()" macro the "right" way to verify it? (i.e., is there any case in which it won't work?)<br>
<br><br>Thanks for the help!<br></div></div>-- <br>John Gamboa<br><a href="http://rabanetescebolas.blogspot.com">rabanetescebolas.blogspot.com</a><br>