mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 18:03:25 +00:00
Fix lost-wakeup in RwMutexUpgradeableGuard_.drop()
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
7a08d9a660
commit
bebfc360da
@ -377,7 +377,7 @@ impl<T: ?Sized, R: Deref<Target = RwMutex<T>>> Deref for RwMutexUpgradeableGuard
|
||||
impl<T: ?Sized, R: Deref<Target = RwMutex<T>>> Drop for RwMutexUpgradeableGuard_<T, R> {
|
||||
fn drop(&mut self) {
|
||||
let res = self.inner.lock.fetch_sub(UPGRADEABLE_READER, Release);
|
||||
if res == 0 {
|
||||
if res == UPGRADEABLE_READER {
|
||||
self.inner.queue.wake_all();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user