mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Add a runtime check for scheduler with spin locks
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
08f50ac085
commit
9cb759efa2
@ -38,11 +38,11 @@ impl IfaceCommon {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn interface(&self) -> SpinLockIrqDisabledGuard<smoltcp::iface::Interface> {
|
||||
pub(super) fn interface(&self) -> SpinLockGuard<smoltcp::iface::Interface> {
|
||||
self.interface.lock_irq_disabled()
|
||||
}
|
||||
|
||||
pub(super) fn sockets(&self) -> SpinLockIrqDisabledGuard<smoltcp::iface::SocketSet<'static>> {
|
||||
pub(super) fn sockets(&self) -> SpinLockGuard<smoltcp::iface::SocketSet<'static>> {
|
||||
self.sockets.lock_irq_disabled()
|
||||
}
|
||||
|
||||
|
@ -65,11 +65,11 @@ mod internal {
|
||||
pub trait IfaceInternal {
|
||||
fn common(&self) -> &IfaceCommon;
|
||||
/// The inner socket set
|
||||
fn sockets(&self) -> SpinLockIrqDisabledGuard<SocketSet<'static>> {
|
||||
fn sockets(&self) -> SpinLockGuard<SocketSet<'static>> {
|
||||
self.common().sockets()
|
||||
}
|
||||
/// The inner iface.
|
||||
fn iface_inner(&self) -> SpinLockIrqDisabledGuard<smoltcp::iface::Interface> {
|
||||
fn iface_inner(&self) -> SpinLockGuard<smoltcp::iface::Interface> {
|
||||
self.common().interface()
|
||||
}
|
||||
/// The time we should do another poll.
|
||||
|
@ -18,7 +18,7 @@ pub(crate) use core::ffi::CStr;
|
||||
pub(crate) use int_to_c_enum::TryFromInt;
|
||||
pub(crate) use jinux_frame::config::PAGE_SIZE;
|
||||
// pub(crate) use jinux_frame::sync::{Mutex, MutexGuard};
|
||||
pub(crate) use jinux_frame::sync::{SpinLock, SpinLockGuard, SpinLockIrqDisabledGuard};
|
||||
pub(crate) use jinux_frame::sync::{SpinLock, SpinLockGuard};
|
||||
pub(crate) use jinux_frame::vm::Vaddr;
|
||||
pub(crate) use jinux_frame::{print, println};
|
||||
pub(crate) use log::{debug, error, info, trace, warn};
|
||||
|
Reference in New Issue
Block a user