WIP: [core/hle/kernel] fix potential datarace when re-scheduling threads at termination #2899

Closed
Lizzie wants to merge 2 commits from lock-term-1 into chore/NamespaceIndentation
Member

Fixes potential race where thread may be told to be non-running but inbetween the acquisition of the lock there may be another holder whom puts it on.
basically:

  • "ok thread aint running on scheduler"
    -"lets now take lock"
  • another thing is holding lock and maybe that other thing re-schedules the thread into the currently active thread
  • "uh oh fuck"
    Signed-off-by: lizzie lizzie@eden-emu.dev
Fixes potential race where thread may be told to be non-running but inbetween the acquisition of the lock there may be another holder whom puts it on. basically: - "ok thread aint running on scheduler" -"lets now take lock" - another thing is holding lock and maybe that other thing re-schedules the thread into the currently active thread - "uh oh fuck" Signed-off-by: lizzie <lizzie@eden-emu.dev>
Lizzie changed title from [core/hle/kernel] fix potential datarace where thread may be told to be non-running but inbetween the acquisition of the lock there may be another holder whom puts it on to [core/hle/kernel] fix potential datarace when re-scheduling threads at termination 2025-10-30 20:56:00 +01:00
Lizzie force-pushed lock-term-1 from 991d6d280d
Some checks reported errors
eden-license / license-header (pull_request) Successful in 32s
GitHub Actions [CI] Build cancelled
to d34400226b
Some checks failed
eden-license / license-header (pull_request) Successful in 31s
GitHub Actions [CI] Build failed
2025-10-30 21:03:31 +01:00
Compare
Lizzie changed title from [core/hle/kernel] fix potential datarace when re-scheduling threads at termination to WIP: [core/hle/kernel] fix potential datarace when re-scheduling threads at termination 2025-10-30 21:19:39 +01:00
Member

Need rebase and fix CI building

Need rebase and fix CI building
DraVee changed target branch from master to chore/NamespaceIndentation 2026-01-11 00:42:56 +01:00
DraVee force-pushed lock-term-1 from d34400226b
Some checks failed
eden-license / license-header (pull_request) Successful in 31s
GitHub Actions [CI] Build failed
to f7eb7b3610
Some checks failed
GitHub Actions [CI] Build failed
2026-01-11 00:43:12 +01:00
Compare
Member

TODO: Add #3294 hash to .git-blame-ignore-revs when merged

TODO: Add #3294 hash to .git-blame-ignore-revs when merged
Author
Member

Think not needed anymore :)

Think not needed anymore :)
Member

Closing it then (need to rebase anyway)

Closing it then (need to rebase anyway)
DraVee closed this pull request 2026-01-30 20:37:58 +01:00
Some checks failed
GitHub Actions [CI] Build failed

Pull request closed

Sign in to join this conversation.
No description provided.