Skip to content

Bind the EE scheduler executor thread on first IRQ dispatch - #234

Closed
hedgeg0d wants to merge 2 commits into
ran-j:mainfrom
hedgeg0d:fix/ee-executor-lazy-bind
Closed

Bind the EE scheduler executor thread on first IRQ dispatch#234
hedgeg0d wants to merge 2 commits into
ran-j:mainfrom
hedgeg0d:fix/ee-executor-lazy-bind

Conversation

@hedgeg0d

Copy link
Copy Markdown

The EE scheduler requires every scheduler operation to run on the executor thread, which gets bound in reset() or bindMainContextForSyscall(). The SIF DMA path (sceSifSetDma -> dispatchDmacHandlersForCause -> dispatchIrq) never binds it, so any direct call from outside the scheduler run loop trips the executor assertion in Debug builds.

Production is unaffected because guest code always runs inside the scheduler loop, and Release builds compile the assertion out, which is why CI never caught it.

dispatchIrq now binds the executor thread on first use, mirroring the lazy binding already done in bindMainContextForSyscall(). The assertion stays in place for every subsequent call.

Verified with the Debug test suite: previously crashed in PS2SifDma after 283 tests, now all 425 tests pass.

@hedgeg0d

Copy link
Copy Markdown
Author

Rebased onto upstream main so the test fix from #233 stays out of this PR.

@hedgeg0d hedgeg0d closed this Aug 29, 2026
@hedgeg0d
hedgeg0d deleted the fix/ee-executor-lazy-bind branch August 29, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant