Skip to main content

SyscallId

Enum SyscallId 

Source
#[repr(usize)]
pub enum SyscallId {
Show 19 variants Mkdir = 34, Mount = 40, Umount = 39, Open = 56, Close = 57, Read = 63, Write = 64, Unlink = 35, Lseek = 62, Getdents = 78, Stat = 1_038, Dup2 = 1_041, Pipe = 59, Exit = 93, GetPid = 172, Fork = 220, Exec = 221, Wait = 260, Unknown = 9_999,
}
Expand description

系统调用号定义 兼容Linux RISC-V系统调用号

Variants§

§

Mkdir = 34

§

Mount = 40

§

Umount = 39

§

Open = 56

§

Close = 57

§

Read = 63

§

Write = 64

§

Lseek = 62

§

Getdents = 78

§

Stat = 1_038

§

Dup2 = 1_041

§

Pipe = 59

§

Exit = 93

§

GetPid = 172

§

Fork = 220

§

Exec = 221

§

Wait = 260

§

Unknown = 9_999

Implementations§

Source§

impl SyscallId

Source

pub const fn requires_live_trap_frame(self) -> bool

Returns true for process-control syscalls that must be dispatched from the live user trap frame instead of the context-only dispatcher.

These calls mutate the current process, scheduler state, or saved user registers. syscall_dispatcher() only receives a copied SyscallContext, so it intentionally returns ENOSYS for this set. Real user-mode traps enter through syscall_trap_dispatcher().

Source

pub const fn process_name(self) -> Option<&'static str>

Trait Implementations§

Source§

impl Clone for SyscallId

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SyscallId

Source§

impl Debug for SyscallId

Source§

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

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

impl Eq for SyscallId

Source§

impl From<usize> for SyscallId

Source§

fn from(id: usize) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SyscallId

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SyscallId

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.