mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 09:16:35 +00:00
实现unified-init库,支持收集初始化函数到一个数组,并统一初始化 (#474)
* 添加“统一初始化”的过程宏,并把SystemError独立成crate * 使用unified-init来初始化fbmem * 更新workflow,增加内核自动化静态测试
This commit is contained in:
@ -11,7 +11,6 @@ use crate::{
|
||||
kinfo,
|
||||
libs::spinlock::SpinLock,
|
||||
net::{generate_iface_id, NET_DRIVERS},
|
||||
syscall::SystemError,
|
||||
time::Instant,
|
||||
};
|
||||
use alloc::{string::String, sync::Arc};
|
||||
@ -21,6 +20,7 @@ use core::{
|
||||
ops::{Deref, DerefMut},
|
||||
};
|
||||
use smoltcp::{phy, wire};
|
||||
use system_error::SystemError;
|
||||
|
||||
use super::e1000e::{E1000EBuffer, E1000EDevice};
|
||||
|
||||
@ -260,10 +260,7 @@ impl NetDriver for E1000EInterface {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
fn poll(
|
||||
&self,
|
||||
sockets: &mut smoltcp::iface::SocketSet,
|
||||
) -> Result<(), crate::syscall::SystemError> {
|
||||
fn poll(&self, sockets: &mut smoltcp::iface::SocketSet) -> Result<(), SystemError> {
|
||||
let timestamp: smoltcp::time::Instant = Instant::now().into();
|
||||
let mut guard = self.iface.lock();
|
||||
let poll_res = guard.poll(timestamp, self.driver.force_get_mut(), sockets);
|
||||
|
Reference in New Issue
Block a user