jerpelea opened a new pull request, #20286:
URL: https://github.com/apache/nuttx/pull/20286
## Summary
Fix a duplicate adjtime() definition when both CONFIG_CLOCK_TIMEKEEPING
and CONFIG_CLOCK_ADJTIME are enabled.
Keep the software-based adjtime() implementation provided by
clock_timekeeping.c when timekeeping is enabled, while retaining
clock_adjtime() support, including the PTP clock path, from clock_adjtime.c.
Clamp wall-clock slew adjustments in both positive and negative
directions.
Subtract each applied adjustment from the remaining adjustment so that
adjtime() converges to zero instead of changing the clock indefinitely.
The timekeeping implementation previously calculated and applied a bounded
adjustment on every wall-clock update, but never removed that amount from
g_clock_adjust. In addition, adjustments larger than the per-update limit were
always clamped to a positive value, causing large negative adjustments to move
the clock in the wrong direction.
When CONFIG_CLOCK_TIMEKEEPING=y and CONFIG_CLOCK_ADJTIME=y, both
clock_timekeeping.c and clock_adjtime.c also defined adjtime(), resulting in a
duplicate symbol. The timekeeping implementation now owns adjtime() in this
configuration, while clock_adjtime.c continues to provide nxclock_adjtime() and
clock_adjtime().
## Impact
RELEASE
## Testing
CI
--
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]