use core::{
cell::UnsafeCell,
marker::PhantomData,
task::{Context, Poll},
};
use super::waiter::WaiterSlot;
use crate::{
global::const_dsl::{ScopeId, ScopeKind},
session::types::Lane,
transport::FrameLabelMask,
};
const MAX_TRACKED_ROLES: usize = u16::BITS as usize;
#[inline]
const fn checked_add_usize(lhs: usize, rhs: usize) -> usize {
if lhs > usize::MAX - rhs {
crate::invariant();
}
lhs + rhs
}
#[inline]
const fn checked_mul_usize(lhs: usize, rhs: usize) -> usize {
if lhs != 0 && rhs > usize::MAX / lhs {
crate::invariant();
}
lhs * rhs
}
#[inline]
const fn checked_sub_usize(lhs: usize, rhs: usize) -> usize {
if lhs < rhs {
crate::invariant();
}
lhs - rhs
}
mod route_table;
pub(crate) use route_table::*;