This avoids an integer division at runtime. --- cpukit/rtems/src/clocktodvalidate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpukit/rtems/src/clocktodvalidate.c b/cpukit/rtems/src/clocktodvalidate.c index d8e9d01382..95c8e77c37 100644 --- a/cpukit/rtems/src/clocktodvalidate.c +++ b/cpukit/rtems/src/clocktodvalidate.c @@ -46,8 +46,8 @@ rtems_status_code _TOD_Validate( return RTEMS_INVALID_ADDRESS; } - ticks_per_second = TOD_MICROSECONDS_PER_SECOND / - rtems_configuration_get_microseconds_per_tick(); + ticks_per_second = rtems_clock_get_ticks_per_second(); + if ((the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || -- 2.26.2 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel