mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 03:13:23 +00:00
Modify the virtio-blk to async
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
2616335755
commit
b7131e721c
@ -156,3 +156,16 @@ impl Drop for DisabledLocalIrqGuard {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// FIXME: The reason we need to add this API is that currently IRQs
|
||||
/// are enabled when the CPU enters the user space for the first time,
|
||||
/// which is too late. During the OS initialization phase,
|
||||
/// we need to get the block device working and mount the filesystems,
|
||||
/// thus requiring the IRQs should be enabled as early as possible.
|
||||
///
|
||||
/// FIXME: this method may be unsound.
|
||||
pub fn enable_local() {
|
||||
if !crate::arch::irq::is_local_enabled() {
|
||||
crate::arch::irq::enable_local();
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,9 @@ pub use handler::in_interrupt_context;
|
||||
pub use trapframe::TrapFrame;
|
||||
|
||||
pub(crate) use self::handler::call_irq_callback_functions;
|
||||
pub use self::irq::{disable_local, DisabledLocalIrqGuard, IrqCallbackFunction, IrqLine};
|
||||
pub use self::irq::{
|
||||
disable_local, enable_local, DisabledLocalIrqGuard, IrqCallbackFunction, IrqLine,
|
||||
};
|
||||
|
||||
pub(crate) fn init() {
|
||||
unsafe {
|
||||
|
Reference in New Issue
Block a user