mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-16 08:46:48 +00:00
Drop the MutexGuard
of semaphore earlier
This commit is contained in:
parent
547e6430ee
commit
ccdf2dc54f
@ -198,6 +198,7 @@ impl Semaphore {
|
||||
} else if zero_condition {
|
||||
return Ok(());
|
||||
}
|
||||
drop(val);
|
||||
|
||||
// Need to wait for the semaphore
|
||||
if flags.contains(IpcFlags::IPC_NOWAIT) {
|
||||
@ -219,7 +220,6 @@ impl Semaphore {
|
||||
} else {
|
||||
self.pending_alters.lock().push_back(pending_op);
|
||||
}
|
||||
drop(val);
|
||||
|
||||
// Wait
|
||||
if let Some(timeout) = timeout {
|
||||
|
Loading…
x
Reference in New Issue
Block a user