sched/sched: Replace nxsched_alarm_tick_expiration() with nxsched_tick_expiration()#17199
Merged
Merged
Conversation
…ks()
In the current NuttX kernel implementation, there is no function
to represent pure scheduler ticks.
The existing clock_systime_ticks() cannot serve this purpose,
because it keeps increasing even when the scheduler is not running.
This happens since the returned value reflects real hardware time:
as long as the timer or alarm hardware is active,
clock_systime_ticks() will continuously increase.
This patch introduces two new functions that provide access to
scheduler ticks — a counter that only increases when the scheduler
itself is running.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Replace direct usage of g_system_ticks with clock_increase_sched_ticks() and clock_get_sched_ticks() Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Improve nxclock_gettime(), to get the system time excluding the time that the system is suspended, when the clockid is CLOCK_MONOTONIC Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Enlarge kflash memory size for the sam3u-ek board
to resolve the build error.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
4865532 to
7593368
Compare
7593368 to
f66d63a
Compare
xiaoxiang781216
previously approved these changes
Oct 17, 2025
Introduce a new function nxsched_tick_expiration() to replace
nxsched_alarm_tick_expiration(). The new function provides a
common implementation that can be shared by both the alarm
and timer architectures.
This change reduces code duplication and provides a unified
function that can be directly reused.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
f66d63a to
da57f1b
Compare
Contributor
Author
|
fixed a CI build error, please check again @xiaoxiang781216 |
xiaoxiang781216
approved these changes
Oct 17, 2025
anchao
approved these changes
Oct 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Please adhere to Contributing Guidelines.
Summary
Improve nuttx kernel tickless implementation,
Impact
Testing
ostest passed on board a2g-tc397-5v-tft