mirror of
https://github.com/vinc/moros.git
synced 2024-06-14 13:16:43 +00:00
18bfaf93d7
* Add a reboot command * Add STOP syscall * Add ctrl-alt-del reboot keys * Add comment to keyboard shortcut
1021 B
1021 B
MOROS Syscalls
This list is unstable and subject to change between versions of MOROS.
EXIT (0x1)
pub fn exit(code: usize) -> usize
SPAWN (0x2)
pub fn spawn(path: &str) -> isize
READ (0x3)
pub fn read(handle: usize, buf: &mut [u8]) -> isize
WRITE (0x4)
pub fn write(handle: usize, buf: &mut [u8]) -> isize
OPEN (0x5)
pub fn open(path: &str, flags: usize) -> isize
CLOSE (0x6)
pub fn close(handle: usize)
INFO (0x7)
pub fn info(path: &str, info: &mut FileInfo) -> isize
DUP (0x8)
pub fn dup(old_handle: usize, new_handle: usize) -> isize
SLEEP (0x9)
pub fn sleep(seconds: f64)
UPTIME (0xA)
pub fn uptime() -> f64
REALTIME (0xB)
pub fn realtime() -> f64
DELETE (0xC)
pub fn delete(path: &str) -> isize
STOP (0xD)
pub fn stop(code: usize)
The system will reboot with 0xcafe
and halt with 0xdead
.