pub enum Syscall {
OpenAt = 56,
Close = 57,
Read = 63,
Write = 64,
Exit = 93,
SchedYield = 124,
GetTimeOfDay = 169,
Shutdown = 210,
Clone = 220,
Execve = 221,
Wait4 = 260,
}Expand description
系统调用号
为调试方便,应当与 Linux 系统为 RISC-V 架构定义的系统调用号保持一致
https://gpages.juszkiewicz.com.pl/syscalls-table/syscalls.html
Variants§
OpenAt = 56
Close = 57
Read = 63
从文件描述符读取
Write = 64
写入文件描述符
Exit = 93
终止当前进程
SchedYield = 124
GetTimeOfDay = 169
Shutdown = 210
关机 (shutdown)
Clone = 220
创建子进程 (fork)
Execve = 221
执行程序 (exec)
Wait4 = 260
等待子进程 (waitpid)
Trait Implementations§
impl Copy for Syscall
impl Eq for Syscall
impl StructuralPartialEq for Syscall
Auto Trait Implementations§
impl Freeze for Syscall
impl RefUnwindSafe for Syscall
impl Send for Syscall
impl Sync for Syscall
impl Unpin for Syscall
impl UnwindSafe for Syscall
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more