Sebastian Huber commented on a discussion: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5538#note_147740


I don't think overflow checks are needed at all. If you are scared that your 
uptime exceeds 38 years, you can set a timer which expires after 37 year and 
then reboot the system or do whatever. How likely is it that a system runs 38 
years without a restart?

With respect to the micro-optimization, this is not only about addition, you 
may have to deal with 64-bit divisions and they can be very slow.

Changing the uptime limit outside the signed 32-bit range would impact the

```c
/**


 *   Define the Timestamp control type.
 */
typedef int64_t Timestamp_Control;
```

definition which is currently a signed 32-bit second and an unsigned 32-bit 
fraction. Changing this data structure to \> 64-bit will definitely impact the 
operating system performance.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5538#note_147740
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to