mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 21:36:30 +00:00
can ctrl-c interupt from blocking accept
This commit is contained in:
@ -241,16 +241,19 @@ impl IfaceCommon {
|
||||
self.poll_at_ms.store(0, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
if has_events {
|
||||
// log::debug!("IfaceCommon::poll: has_events");
|
||||
// We never try to hold the write lock in the IRQ context, and we disable IRQ when
|
||||
// holding the write lock. So we don't need to disable IRQ when holding the read lock.
|
||||
self.bounds.read().iter().for_each(|bound_socket| {
|
||||
bound_socket.on_iface_events();
|
||||
// if has_events {
|
||||
|
||||
// log::debug!("IfaceCommon::poll: has_events");
|
||||
// We never try to hold the write lock in the IRQ context, and we disable IRQ when
|
||||
// holding the write lock. So we don't need to disable IRQ when holding the read lock.
|
||||
self.bounds.read().iter().for_each(|bound_socket| {
|
||||
bound_socket.on_iface_events();
|
||||
if has_events {
|
||||
bound_socket
|
||||
.wait_queue()
|
||||
.wakeup(Some(ProcessState::Blocked(true)));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// let closed_sockets = self
|
||||
// .closing_sockets
|
||||
@ -258,7 +261,7 @@ impl IfaceCommon {
|
||||
// .extract_if(|closing_socket| closing_socket.is_closed())
|
||||
// .collect::<Vec<_>>();
|
||||
// drop(closed_sockets);
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
pub fn update_ip_addrs(&self, ip_addrs: &[smoltcp::wire::IpCidr]) -> Result<(), SystemError> {
|
||||
|
Reference in New Issue
Block a user