xiaoxiang781216 opened a new pull request, #18840:
URL: https://github.com/apache/nuttx/pull/18840
## Summary
Remove the `CONFIG_SYSTEM_TIME64` Kconfig option and always use a 64-bit
system clock. `time_t`, `clock_t`, `sclock_t`, and `nuttx_time_t` are
now unconditionally 64-bit (signed/unsigned as appropriate).
The 32-bit system clock has a limited range (~497 days) and most modern
targets already enable `CONFIG_SYSTEM_TIME64`. Making 64-bit time the
single supported configuration removes a large amount of `#ifdef`
clutter from the OS proper, headers, drivers, and board defconfigs.
## Impact
### Behavior
- `time_t` and `clock_t` are always 64-bit unsigned integers.
- `sclock_t` is always `int64_t`.
- `nuttx_time_t` (hostfs ABI) is always 64-bit.
- `CLOCK_MAX` is always `UINT64_MAX`.
- `PRI*TM` / `SCN*TM` always map to the 64-bit forms.
### Removed
- `CONFIG_SYSTEM_TIME64` Kconfig option.
- `depends on SYSTEM_TIME64` in `PERF_OVERFLOW_CORRECTION` and `HRTIMER`.
- `#ifdef CONFIG_SYSTEM_TIME64` branches in:
- `include/nuttx/clock.h`, `sched/clock/clock.h`
- `include/sys/types.h`, `include/inttypes.h`, `include/limits.h`
- `include/nuttx/fs/hostfs.h`
- `fs/procfs/fs_procfsuptime.c`, `drivers/power/pm/pm_procfs.c`
- `drivers/rpmsg/rpmsg_ping.c`, `libs/libc/wqueue/work_usrthread.c`
- `CONFIG_SYSTEM_TIME64=y` from all board defconfigs.
- Stale comment in `arch/avr/src/avrdx/avrdx_timerisr_tickless_alarm.c`.
- Mention of `CONFIG_SYSTEM_TIME64` in `Documentation/guides/rust.rst`.
## Testing
- `tools/checkpatch.sh -f` clean on all changed C/H files.
## Related apps PR
apache/nuttx-apps#NEW (drop matching `CONFIG_SYSTEM_TIME64` ifdefs).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]