-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Soundness of CriticalSectionDefaultMutex implementation #513
Comments
Agh, I think you're right; we need the |
Will do, just a moment |
Just a gentle bump :) Also for #515 |
Alright, published |
I am currently experiencing some deadlocks with the
WaitQueue
when using the cs-backed mutex in a single-core system with interrupts. The stack trace seems to be stuck at theSpinLock
inside theCriticalSectionDefaultMutex
, which in my mind is a place the cs-mutex should never be on a single-core system.I looked at the code:
https://github.com/hawkw/mycelium/blob/main/maitake-sync/src/blocking/default_mutex.rs#L294-L326
Specifically the
ScopedRawMutex
trait functionwith the
SpinLock::with_lock
beingIs it not incorrect to first lock the spin-lock, and then enter the critical section after? If an interrupt fires between locking the
SpinLock
and entering the critical section withf()
the interrupt context would just get stuck in the spin loop trying to lock.The text was updated successfully, but these errors were encountered: