change log for rtems (2011-05-26)

Joel Sherrill joel.sherrill at
Wed Sep 26 14:29:14 UTC 2012

On 9/26/2012 9:23 AM, Sebastian Huber wrote:
> On 09/26/2012 03:51 PM, Joel Sherrill wrote:
>> On 09/26/2012 08:48 AM, Sebastian Huber wrote:
>>> On 09/26/2012 03:40 PM, Joel Sherrill wrote:
>>>> On 09/26/2012 07:00 AM, Sebastian Huber wrote:
>>>>> What has this change to do with SMP inter-process communications?  Why do we
>>>>> update _Thread_Time_of_last_context_switch in case
>>>>> __RTEMS_USE_TICKS_FOR_STATISTICS__ is defined?
>>>> At least I can explain this part of the change.  There were technically
>>>> two changes in that commit. They got merged into one and the comment
>>>> doesn't reflect that.
>>>> If you don't set the _Thread_Time_of_last_context_switch, then the
>>>> statistics for rate monotonic periods are not completely right. You
>>>> need to account for how long the current task has been running.
>>> Ok, but then the rate-monotonic statistics do not honor the
>>> __RTEMS_USE_TICKS_FOR_STATISTICS__.  I currently don't have time to look at
>>> this more detailed, but I think something is mixed up here.
>> Where do they not honor that? I see it used in a number of
>> rate monotonic files:
>> ./include/rtems/rtems/ratemon.h
>> ./src/ratemongetstatistics.c
>> ./src/ratemongetstatus.c
>> ./src/ratemonreportstatistics.c
>> ./src/ratemonperiod.c
> I think the purpose of the __RTEMS_USE_TICKS_FOR_STATISTICS__ is that we use
> only ticks for the statistics.
> The threaddispatch.c doesn't compile with __RTEMS_USE_TICKS_FOR_STATISTICS__
> defined:
> /home/sh/git-rtems/c/src/../../cpukit/score/src/threaddispatch.c: In function
> '_Thread_Dispatch':
> /home/sh/git-rtems/c/src/../../cpukit/score/src/threaddispatch.c:112:9:
> warning: implicit declaration of function 'TOD_Get_uptime'
> [-Wimplicit-function-declaration]
> /home/sh/git-rtems/c/src/../../cpukit/score/src/threaddispatch.c:112:9:
> warning: nested extern declaration of 'TOD_Get_uptime' [-Wnested-externs]
> /home/sh/git-rtems/c/src/../../cpukit/score/src/threaddispatch.c:112:26: error:
> '_Thread_Time_of_last_context_switch' undeclared (first use in this function)
> /home/sh/git-rtems/c/src/../../cpukit/score/src/threaddispatch.c:112:26: note:
> each undeclared identifier is reported only once for each function it appears in
OK. I will look into this if you don't fix it first. :)

Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill at        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985

More information about the devel mailing list