Skip to content
Snippets Groups Projects
Commit e8b34467 authored by Avi Kivity's avatar Avi Kivity
Browse files

sched: atomic thread state

Currently, we have an atomic _waiting state for a thread, and additional
non-atomic _on_runqueue and _terminated states.  This is problematic since
a ->wake() racing with a ->stop_wait() can cause a thread to be
simultaneously running and queued.

Fix by using a single atomic variable for all theses states.
parent c87706a3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment