rusty_mos::kernel::syscall

Enum SyscallNo

Source
#[repr(u8)]
pub enum SyscallNo {
Show 22 variants SysPutchar = 0, SysPrintCons = 1, SysGetenvid = 2, SysYield = 3, SysEnvDestroy = 4, SysSetTlbModEntry = 5, SysMemAlloc = 6, SysMemMap = 7, SysMemUnmap = 8, SysExofork = 9, SysSetEnvStatus = 10, SysSetTrapframe = 11, SysPanic = 12, SysIpcTrySend = 13, SysIpcRecv = 14, SysCgetc = 15, SysWriteDev = 16, SysReadDev = 17, SysCreatePool = 18, SysBindPool = 19, SysLock = 20, SysUnlock = 21,
}
Expand description

Syscall identifier. The number is ordered by enum automatically.

Variants§

§

SysPutchar = 0

Print a char into the console.

§

SysPrintCons = 1

Print a straight string ends with zero into the console.

§

SysGetenvid = 2

Get the id of the current env.

§

SysYield = 3

Give out the CPU time and re-schedule.

§

SysEnvDestroy = 4

Destory a env by its id and kill it.

§

SysSetTlbModEntry = 5

Register the user-space TLB mod handler for the specified env.

§

SysMemAlloc = 6

Allocate memory and map it.

§

SysMemMap = 7

Map the virtual address to a specified physical page.

§

SysMemUnmap = 8

Unmap the address and the page.

§

SysExofork = 9

Allocate a new env and make it child of the current env.

§

SysSetEnvStatus = 10

Set the env status and move it between the lists.

§

SysSetTrapframe = 11

Set the trapframe to he specified env.

§

SysPanic = 12

Do kernel panic.

§

SysIpcTrySend = 13

Try to send an ipc data to a env.

§

SysIpcRecv = 14

Receive a ipc data or wait.

§

SysCgetc = 15

Scan a char from the console

§

SysWriteDev = 16

Write to a dev.

§

SysReadDev = 17

Read from a dev.

§

SysCreatePool = 18

Create a memory pool.

§

SysBindPool = 19

Bind a memory pool.

§

SysLock = 20

Try to lock a memory pool.

§

SysUnlock = 21

Unlock a memory pool.

Auto Trait Implementations§

§

impl Freeze for SyscallNo

§

impl RefUnwindSafe for SyscallNo

§

impl Send for SyscallNo

§

impl Sync for SyscallNo

§

impl Unpin for SyscallNo

§

impl UnwindSafe for SyscallNo

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.