Skip to content

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

Open
hedgeg0d wants to merge 1 commit into
ran-j:mainfrom
hedgeg0d:fix/ee-executor-lazy-bind
Open

Bind the EE scheduler executor thread on first IRQ dispatch#235
hedgeg0d wants to merge 1 commit 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
hedgeg0d force-pushed the fix/ee-executor-lazy-bind branch from f229d8a to 3279af7 Compare August 30, 2026 00:51
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