Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Me 1 - 0 Glibc: replace buggy Glibc condvar by futex #58

Merged
merged 5 commits into from
Dec 21, 2019
Merged

Conversation

mratsim
Copy link
Owner

@mratsim mratsim commented Dec 20, 2019

This replaces Lock+Condition variables by futex on Linux.

It solves the nasty #56 bug which is due to a Glibc and Musl bug on condvar signaling not waking up all thread.

Would be nice to use futex on Windows as well as they are supported there and are much more lightweight than condition variables + lock (4 bytes vs ~72 bytes on Linux) plus we don't need all the extra fluff that mutexes and condition variables have to guard against as we have formally verified that just wait+wake is enough.

@mratsim
Copy link
Owner Author

mratsim commented Dec 21, 2019

@mratsim mratsim merged commit 55a86f0 into master Dec 21, 2019
@mratsim mratsim deleted the futex branch December 22, 2019 23:46
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