Refactor VmReader&VmWriter as given fallibility marker

This commit is contained in:
Shaowei Song
2024-08-20 02:05:25 +00:00
committed by Tate, Hongliang Tian
parent 562e644375
commit 2102107be1
16 changed files with 172 additions and 104 deletions

View File

@ -11,10 +11,13 @@ use alloc::{collections::BTreeMap, fmt::Debug, string::String, sync::Arc, vec::V
use core::any::Any;
use component::{init_component, ComponentInitError};
use ostd::{mm::VmReader, sync::SpinLock};
use ostd::{
mm::{Infallible, VmReader},
sync::SpinLock,
};
use spin::Once;
pub type ConsoleCallback = dyn Fn(VmReader) + Send + Sync;
pub type ConsoleCallback = dyn Fn(VmReader<Infallible>) + Send + Sync;
pub trait AnyConsoleDevice: Send + Sync + Any + Debug {
fn send(&self, buf: &[u8]);