Skip to content

arch/sim/sim_oneshot: Calculate next oneshot time in ticks instead of… - #16358

Merged
xiaoxiang781216 merged 2 commits into
apache:masterfrom
tiiuae:fix_sim_oneshot
May 13, 2025
Merged

xiaoxiang781216 merged 2 commits into
apache:masterfrom
tiiuae:fix_sim_oneshot

Conversation

@jlaitine

Copy link
Copy Markdown
Contributor

Summary

This removes drift in tick start times, by aligning the tick start time to be even multiple of the tick time.

Impact

This fixes random failures in sim:citest (cmocka_posix_timers), where it often sleeps one tick too long initially.

Testing

Tested on sim:citest, cmocka.

@github-actions github-actions Bot added Arch: simulator Issues related to the SIMulator Size: XS The size of the change in this PR is very small labels May 12, 2025
@github-actions github-actions Bot added Area: OS Components OS Components issues Size: S The size of the change in this PR is small and removed Size: XS The size of the change in this PR is very small labels May 12, 2025
Comment thread arch/sim/src/sim/sim_oneshot.c Resolved
@github-actions github-actions Bot removed the Area: OS Components OS Components issues label May 12, 2025
Jukka Laitinen added 2 commits May 12, 2025 16:10
… timespec

This removes drift in tick start times, when the base time is always rounded to
tick boundary.

Signed-off-by: Jukka Laitinen <[email protected]>
@xiaoxiang781216
xiaoxiang781216 merged commit e78a334 into apache:master May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: simulator Issues related to the SIMulator Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants