Struct trapframe::UserContext [−][src]
User space context
Fields
general: GeneralRegs
trap_num: usize
error_code: usize
Implementations
impl UserContext
[src]
pub fn run_fncall(&mut self)
[src]
Go to user context by function return, within the same privilege level.
User program should call syscall_fn_entry()
to return back.
Trap reason and error code will always be set to 0x100 and 0.
impl UserContext
[src]
pub fn get_syscall_num(&self) -> usize
[src]
Get number of syscall
pub fn get_syscall_ret(&self) -> usize
[src]
Get return value of syscall
pub fn set_syscall_ret(&mut self, ret: usize)
[src]
Set return value of syscall
pub fn get_syscall_args(&self) -> [usize; 6]
[src]
Get syscall args
pub fn set_ip(&mut self, ip: usize)
[src]
Set instruction pointer
pub fn set_sp(&mut self, sp: usize)
[src]
Set stack pointer
pub fn get_sp(&self) -> usize
[src]
Get stack pointer
pub fn set_tls(&mut self, tls: usize)
[src]
Set tls pointer
Trait Implementations
impl Clone for UserContext
[src]
fn clone(&self) -> UserContext
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for UserContext
[src]
impl Debug for UserContext
[src]
impl Default for UserContext
[src]
fn default() -> UserContext
[src]
impl Eq for UserContext
[src]
impl PartialEq<UserContext> for UserContext
[src]
fn eq(&self, other: &UserContext) -> bool
[src]
fn ne(&self, other: &UserContext) -> bool
[src]
impl StructuralEq for UserContext
[src]
impl StructuralPartialEq for UserContext
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,