DirectSyscall

Struct DirectSyscall 

Source
pub struct DirectSyscall { /* private fields */ }
Expand description

direct syscall invoker

holds the SSN and provides methods to invoke the syscall directly with varying argument counts

Implementations§

Source§

impl DirectSyscall

Source

pub const fn new(ssn: u16) -> Self

create from SSN

Source

pub fn from_entry(entry: &SyscallEntry) -> Self

create from syscall entry

Source

pub fn from_table(table: &SyscallTable, name: &str) -> Result<Self>

create from syscall table lookup

Source

pub const fn ssn(&self) -> u16

get SSN

Source§

impl DirectSyscall

Source

pub unsafe fn call0(&self) -> i32

invoke syscall with 0 arguments

§Safety

caller must ensure the syscall is appropriate to call with 0 args

Source

pub unsafe fn call1(&self, arg1: usize) -> i32

invoke syscall with 1 argument

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call2(&self, arg1: usize, arg2: usize) -> i32

invoke syscall with 2 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call3(&self, arg1: usize, arg2: usize, arg3: usize) -> i32

invoke syscall with 3 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call4( &self, arg1: usize, arg2: usize, arg3: usize, arg4: usize, ) -> i32

invoke syscall with 4 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call5( &self, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize, ) -> i32

invoke syscall with 5 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call6( &self, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize, arg6: usize, ) -> i32

invoke syscall with 6 arguments

§Safety

caller must ensure args are valid for this syscall

Source

pub unsafe fn call_many(&self, args: &[usize]) -> i32

invoke syscall with variable arguments (uses array)

supports up to 8 arguments

§Safety

caller must ensure args are valid for this syscall

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
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, 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.