mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 16:13:27 +00:00
Add a fast path to has_pending
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
66f2dacaf8
commit
6a5a5b4d3d
@ -69,6 +69,9 @@ impl SigQueues {
|
|||||||
|
|
||||||
/// Returns whether there's some pending signals that are not blocked
|
/// Returns whether there's some pending signals that are not blocked
|
||||||
pub fn has_pending(&self, blocked: SigMask) -> bool {
|
pub fn has_pending(&self, blocked: SigMask) -> bool {
|
||||||
|
if self.is_empty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
self.queues.lock().has_pending(blocked)
|
self.queues.lock().has_pending(blocked)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user