RTEMS - rtems_clock_get_uptime() fails during timer tick

Rolf Schroedter rolf.schroedter at dlr.de
Thu Feb 24 07:51:39 UTC 2011


I tried to protect the call to rtems_clock_get_uptime() from interrupts
(this was easier than to recompile RTEMS):

#define _get_uptime( _ptr_uptime )        \
{                        \
     rtems_interrupt_level   _level;        \
                         \
     rtems_interrupt_disable(_level);        \
     rtems_clock_get_uptime( _ptr_uptime );    \
     rtems_interrupt_enable(_level);        \
}

But surprisingly (at least for me) this didn't solve the problem.
Okay, I'll try to grab into the RTEMS sources.

Thanks & regards,
Rolf.


On 24.02.2011 01:23, Gedare Bloom wrote:
> Hi,
>
> I suppose if your code is interrupting the rtems_clock_tick, this
> behavior might happen. Can you try to add an ISR_Disable / ISR_Enable
> protection around the call to "_Timestamp_Add_to(&_TOD_Uptime,&tick
> );" in cpukit/score/src/coretodtickle.c and see if the problem
> disappears?
>
> -Gedare
>




More information about the users mailing list