RTEMS | Specify limits of CLOCK_MONOTONIC (uptime) (#5538)
Joel Sherrill (@joel)
gitlab at rtems.org
Tue Mar 31 14:10:18 UTC 2026
Joel Sherrill commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5538#note_147609
C23 has [stdckdint.h](https://en.cppreference.com/w/c/header/stdckdint.html) which provides three math functions which check for overflow and return a _bool_. I don't know how long it has been available but GCC 14 (nios2) has it and I don't see it installed with microblaze. If it is decided to use that, it would be the first C23 feature used in RTEMS so we should tread carefully. It is likely the microblaze would no longer compile.
When I switched RTEMS from using _struct timespec_ internally to 64-bit nanoseconds since epoch, it simplified the generated code. And the 64-bit math versus 32-bit math on 32-bit targets is a few more instructions. Better to be correct than micro-optimized.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5538#note_147609
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260331/298da8d6/attachment.htm>
More information about the bugs
mailing list