[][src]Struct sunrise_kernel::i386::interrupt_service_routines::UserspaceHardwareContext

#[repr(C)]pub struct UserspaceHardwareContext {
    pub esp: usize,
    pub gs: usize,
    pub ebp: usize,
    pub edi: usize,
    pub esi: usize,
    pub edx: usize,
    pub ecx: usize,
    pub ebx: usize,
    pub eax: usize,
    pub errcode: usize,
    pub eip: usize,
    pub cs: usize,
    pub eflags: usize,
}

Represents a register backup.

The exception wrapper constructs this structure before calling the exception handler, and saves it to the ThreadStruct for debug purposes.

When the exception handler returns, the wrapper pops it before returning to userspace, allowing precise control over register state. The only exception being .esp, which will not be reloaded into esp, see trap_gate_asm.

Fields

esp: usizegs: usizeebp: usizeedi: usizeesi: usizeedx: usizeecx: usizeebx: usizeeax: usizeerrcode: usizeeip: usizecs: usizeeflags: usize

Implementations

impl UserspaceHardwareContext[src]

fn apply0(&mut self, ret: Result<(), UserspaceError>)[src]

Update the Registers with the passed result.

fn apply1(&mut self, ret: Result<usize, UserspaceError>)[src]

Update the Registers with the passed result.

fn apply2(&mut self, ret: Result<(usize, usize), UserspaceError>)[src]

Update the Registers with the passed result.

fn apply3(&mut self, ret: Result<(usize, usize, usize), UserspaceError>)[src]

Update the Registers with the passed result.

fn apply4(&mut self, ret: Result<(usize, usize, usize, usize), UserspaceError>)[src]

Update the Registers with the passed result.

Trait Implementations

impl Clone for UserspaceHardwareContext[src]

impl Debug for UserspaceHardwareContext[src]

impl Default for UserspaceHardwareContext[src]

impl Display for UserspaceHardwareContext[src]

Auto Trait Implementations

impl RefUnwindSafe for UserspaceHardwareContext

impl Send for UserspaceHardwareContext

impl Sync for UserspaceHardwareContext

impl Unpin for UserspaceHardwareContext

impl UnwindSafe for UserspaceHardwareContext

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.