Skip to main content

N3Transport

Struct N3Transport 

Source
pub struct N3Transport {
Show 13 fields frame_idx: usize, frame_phys: u64, frame_virt: u64, msg_buf: MsgBuffer, msg_buf_phys: u64, handler_stack_top: u64, handler_stack_phys: u64, sender_task_id: TaskId, receiver_task_id: TaskId, tier: N3Tier, pcid_sender: u16, pcid_receiver: u16, watchdog_timeout_cycles: u64,
}
Expand description

N3 MMU transport : thread migration between distinct address spaces.

Fields§

§frame_idx: usize

Index in the static frame pool.

§frame_phys: u64

Physical address of the MigrationFrame page.

§frame_virt: u64

Virtual address of the MigrationFrame (same in both AS).

§msg_buf: MsgBuffer

Shared message buffer (kernel-allocated, mapped in both AS).

§msg_buf_phys: u64

Physical address of the message buffer.

§handler_stack_top: u64

Dedicated handler stack (1 page, kernel-allocated). After CR3 switch, dst_ctx.rsp points to the top of this stack with the handler address as the return address.

§handler_stack_phys: u64

Physical address of the handler stack.

§sender_task_id: TaskId

Sender task ID.

§receiver_task_id: TaskId

Receiver task ID.

§tier: N3Tier

N3 tier (b or c).

§pcid_sender: u16

Sender’s PCID (0 for N3c).

§pcid_receiver: u16

Receiver’s PCID (0 for N3c).

§watchdog_timeout_cycles: u64

Watchdog timeout in TSC cycles.

Implementations§

Source§

impl N3Transport

Source

pub fn new( sender_task_id: TaskId, receiver_task_id: TaskId, ) -> Result<Self, IpcError>

Create a new N3 transport between sender and receiver tasks.

Allocates a MigrationFrame and a shared message buffer, maps them in both address spaces, and registers the endpoint with the watchdog.

Source

pub(crate) fn frame(&self) -> &MigrationFrame

Get a reference to the underlying MigrationFrame.

Source

pub(crate) fn frame_ptr(&self) -> *mut MigrationFrame

Get the raw pointer to the MigrationFrame (for ASM primitive).

Trait Implementations§

Source§

impl Debug for N3Transport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for N3Transport

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl IpcConsumer for N3Transport

Source§

fn recv(&self, buf: &mut [u8]) -> Result<usize, IpcError>

Receive a message, blocking if the buffer is empty.
Source§

fn try_recv(&self, buf: &mut [u8]) -> Result<Option<usize>, IpcError>

Receive without blocking.
Source§

impl IpcProducer for N3Transport

Source§

fn send(&self, msg: &[u8]) -> Result<(), IpcError>

Send a message, blocking if the buffer is full.
Source§

fn try_send(&self, msg: &[u8]) -> Result<(), IpcError>

Send without blocking.
Source§

fn send_vectored(&self, bufs: &[&[u8]]) -> Result<(), IpcError>

Send using vectored I/O (scatter-gather). Read more
Source§

impl IpcTransport for N3Transport

Source§

fn level(&self) -> TransportLevel

The isolation level of this transport.
Source§

fn capabilities(&self) -> TransportCapabilities

Static capabilities of this transport.
Source§

fn name(&self) -> &'static str

Human-readable name for debugging / profiling.
Source§

impl Send for N3Transport

Source§

impl Sync for N3Transport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.