[LITMUS^RT] Question about the RT_F_XXX flags

Glenn Elliott gelliott at cs.unc.edu
Tue Oct 2 21:20:06 CEST 2012


On Oct 2, 2012, at 3:06 PM, Björn Brandenburg <bbb at mpi-sws.org> wrote:

> 
> On Oct 1, 2012, at 10:43 PM, John Gamboa wrote:
> 
>> 2012/10/1 Jonathan Herman <hermanjl at cs.unc.edu>
>> Hi John,
>> 
>> Hi. Thanks for the quick answer!
>> 
>> There is some term overloading going on here which causes confusion.
>> The is_running() macro does not refer to RT_F_RUNNING, nor is the
>> task_wake_up() call invoked when a task should go from RT_F_SLEEP to
>> RUNNING. RT_F_SLEEP is unrelated to blocking / waking up from
>> blocking.
>> 
>> As I see it, RT_F_SLEEP refers to tasks which should not be run
>> because they have completed their current job. Its only purpose is to
>> allow the complete_job() method (called from userspace) to mark a job
>> as "completed". This way, the subsequent call to psn_edf_schedule()
>> can prepare the job for its next period and arm any appropriate
>> timers.
> 
> Exactly, RT_F_RUNNING is a remnant  from the very first version of Litmus (2006 era). The only use is to signal to the scheduling function that a job completion has occurred. It's not very elegant and terribly misnamed (it really has nothing to do with actual suspensions/wakeups), but I guess nobody ever got around to renaming it…

We could just replace it with a single bit field in the rt_param struct.  There are already many "int myvar:1" fields in rt_param.

-Glenn



More information about the litmus-dev mailing list