Add a runtime check for scheduler with spin locks

This commit is contained in:
Chuandong Li
2023-07-25 10:18:20 +08:00
committed by Tate, Hongliang Tian
parent 08f50ac085
commit 9cb759efa2
12 changed files with 170 additions and 177 deletions

View File

@ -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()
}

View File

@ -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.