rtems_task_wake_after()/usleep() sleeping less than requested?

Martin Erik Werner martinerikwerner.aac at gmail.com
Thu Apr 18 11:41:38 UTC 2019

With our custom bsp of rtems (based on sparc/leon3 from 4.11.3) we are
observing that rtems_task_wake_after() and usleep() quite often sleeps
less than the requested amount when measured
with rtems_clock_get_uptime_nanoseconds() timestamps.

Is this expected behaviour for sleep in rtems or is this indicative of
some issue in our bsp (possibly in the realms of our clock driver,
either affecting the actual sleep or the measurement, or both).

The opengroup specification of usleep() indicates that it should always
sleep equal to or more than the requested time, provided no signals:

Martin Erik Werner
Software Engineer | ÅAC Microtec AB | Clyde Space Ltd.

More information about the users mailing list