Skip to content

Conversation

@Sonicadvance1
Copy link
Member

This will be useful to fix the mutex locking mess that occurs currently when forks occur. Instead of needing to be /very/ meticulous with many futexes, we can instead have working threads shared_lock this one, then when a fork occurs just only have the forker themselves unique_lock and let the readers drain out. Since it's write-priority it'll happen quite quickly, letting the fork get in and out relatively easily.

This is going to take some massaging to get the frontend and FEXCore to a place that this works but we can get this simple change in early.

This will be useful to fix the mutex locking mess that occurs currently
when forks occur. Instead of needing to be /very/ meticulous with many
futexes, we can instead have working threads shared_lock this one, then
when a fork occurs just only have the forker themselves unique_lock and
let the readers drain out. Since it's write-priority it'll happen quite
quickly, letting the fork get in and out relatively easily.

This is going to take some massaging to get the frontend and FEXCore to
a place that this works but we can get this simple change in early.
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