-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Redox: Fix Condvar.wait(); do not lock mutex twice #43082
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
Conversation
@bors: r+ rollup |
📌 Commit 86191f4 has been approved by |
🔒 Merge conflict |
Is there a test for this stuff? I'm assuming the previous behavior would be an immediate deadlock as soon as the convar wakes up? |
Yes. The implementation now matches https://locklessinc.com/articles/mutex_cv_futex/, which @jackpot51 says he used as a reference to implement it; it seems this line was added by accident. I don't see a test for |
Heads up, @ids1024; you've got a merge conflict. |
But what merge conflict? It seems to merge cleanly with master, and the only file changed here is a Redox-specific file that hasn't been changed in months. |
@ids1024 you'll want to just rebase against rust-lang/rust's master branch |
The atomic_xchg() loop locks the mutex, so the call to mutex_lock is incorrect, and blocks.
@alexcrichton it has been rebased. |
@bors: r+ |
📌 Commit 59981e4 has been approved by |
Redox: Fix Condvar.wait(); do not lock mutex twice The atomic_xchg() loop locks the mutex, so the call to mutex_lock is incorrect, and blocks.
☀️ Test successful - status-appveyor, status-travis |
The atomic_xchg() loop locks the mutex, so the call to mutex_lock is
incorrect, and blocks.