Skip to main content

MigrationFrame

Struct MigrationFrame 

Source
#[repr(C, align(64))]
pub struct MigrationFrame { pub src_ctx: N3MinimalContext, pub dst_ctx: N3MinimalContext, pub state: AtomicU8, _pad_state: [u8; 3], pub generation: AtomicU32, pub msg_len: u16, pub flags: u16, _pad_flags: [u8; 4], pub tsc_start: AtomicU64, pub owner_tid: AtomicU64, pub _pad: [u8; 32], }
Expand description

Shared migration frame : one per N3 transport endpoint pair.

Must reside in a dedicated physical page mapped at the same kernel virtual address (N3_SHARED_FRAME_VA) in both sender and receiver address spaces. The mapping is kernel-only (no USER_ACCESSIBLE flag) : all access is controlled by the kernel via the CAS state machine. Both address spaces see the same physical page through their own kernel half of the page tables.

Fields§

§src_ctx: N3MinimalContext

Sender context (saved by ASM primitive).

§dst_ctx: N3MinimalContext

Receiver context (prepared by kernel before migration).

§state: AtomicU8

Atomic state: MigrationState.

§_pad_state: [u8; 3]§generation: AtomicU32

Monotonically increasing migration counter.

§msg_len: u16

Message length in bytes.

§flags: u16

Migration flags.

§_pad_flags: [u8; 4]§tsc_start: AtomicU64

TSC snapshot at migration start (for watchdog).

§owner_tid: AtomicU64

Thread ID of the frame owner.

§_pad: [u8; 32]

Reserved padding for future use and cache-line alignment.

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.