Repository navigation
refactor(timer): share async lifecycle and fix WS63 cancellation - #19
Draft
sanchuanhehe wants to merge 2 commits into
Draft
sanchuanhehe wants to merge 2 commits into
sanchuanhehe wants to merge 2 commits into
Conversation
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.
A cancelled WS63 async delay left its counter/IRQ running, and an empty IRQ could complete a live wait. WS53 and WS63 now use one one-shot lifecycle for arming, Waker registration, completion and cancellation; their PAC/IRQ adapters and ownership entry points remain separate. WS63 also adopts upward rounding, zero/no-arm and bounded long-period chunks. No Embassy queue or second timer owner is introduced.
Two commits: extract and validate the WS53 lifecycle (moving MMIO outside metadata critical sections), then integrate/fix WS63 while preserving public signatures. The former WS53 lifecycle tests move into the shared child-owned suite, with immediate-arm expiry, late-status expiry, channel isolation and callback/IO lock checks added.
Independent development checks: WS63/WS53/BS21 host tests 351/432/220, all three target Clippy checks, formatting and no-Embassy dependency guards pass. WS53 QEMU passes two channels, 16 expiries, four cancellations and six handoff guards. WS63 opt-in fixture fails with baseline da254f8 at cancellation, passes with this change on all three WS63 channels, each followed by five IRQ-driven waits. WS53 SPI/I2C DMA plus timer IRQ regression passes 50/166 scenarios.
No hardware operations. Physical stop/IRQ timing and cross-core ownership remain unqualified; minimal block_on poll-to-WFI and legacy DMA safety are separate outstanding issues. Fixed remote runtime overrides are development integration, not registry release qualification. Stacked on #18; no history rewriting or stable API graduation.