Commit ccdd84a7 authored by ReinUsesLisp's avatar ReinUsesLisp
Browse files

hle/scheduler: Fix data race in is_context_switch_pending

As reported by tsan, SelectThreads could write to
is_context_switch_pending holding a mutex while SwitchToCurrent reads it
without holding any.

It is assumed that the author didn't want an atomic here, so the code is
reordered so that whenever is_context_switch_pending is read inside
SwitchToContext, the mutex is locked.
parent 4efaecf1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment