mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 20:03:22 +00:00
Don't poll ifaces if not necessary
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
fab61f5f66
commit
1c1da8ea06
@ -6,7 +6,7 @@ use aster_bigtcp::device::WithDevice;
|
||||
use ostd::sync::LocalIrqDisabled;
|
||||
use spin::Once;
|
||||
|
||||
use super::{poll_ifaces, Iface};
|
||||
use super::{poll::poll_ifaces, Iface};
|
||||
use crate::{
|
||||
net::iface::ext::{IfaceEx, IfaceExt},
|
||||
prelude::*,
|
||||
|
@ -4,8 +4,9 @@ mod ext;
|
||||
mod init;
|
||||
mod poll;
|
||||
|
||||
pub use ext::IfaceEx;
|
||||
pub use init::{init, IFACES};
|
||||
pub use poll::{lazy_init, poll_ifaces};
|
||||
pub use poll::lazy_init;
|
||||
|
||||
pub type Iface = dyn aster_bigtcp::iface::Iface<ext::IfaceExt>;
|
||||
pub type BoundTcpSocket = aster_bigtcp::socket::BoundTcpSocket<ext::IfaceExt>;
|
||||
|
@ -19,7 +19,7 @@ pub fn lazy_init() {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn poll_ifaces() {
|
||||
pub(super) fn poll_ifaces() {
|
||||
let ifaces = IFACES.get().unwrap();
|
||||
|
||||
for iface in ifaces.iter() {
|
||||
|
Reference in New Issue
Block a user