Add a fast path to has_pending

This commit is contained in:
Chen Chengjun
2024-09-05 21:07:06 +08:00
committed by Tate, Hongliang Tian
parent 66f2dacaf8
commit 6a5a5b4d3d

View File

@ -69,6 +69,9 @@ impl SigQueues {
/// Returns whether there's some pending signals that are not blocked
pub fn has_pending(&self, blocked: SigMask) -> bool {
if self.is_empty() {
return false;
}
self.queues.lock().has_pending(blocked)
}