rusty_mos::kernel

Module syscall_impl

Source
Expand description

Syscall implementations.

StructsΒ§

  • CLikeStr πŸ”’
    A wrapper for the *const u8.

ConstantsΒ§

  • Syscall function table. Indexed with the syscall number.

FunctionsΒ§

  • Get the syscall number and all the five arguments. Invoke the syscall.
  • SYSNO: 19, bind a existed memory pool.
  • sys_cgetc πŸ”’
    SYSNO: 15, read a char from the console via scan_charc.
  • SYSNO: 18, create a shared memory pool.
  • sys_env_destroy πŸ”’
    SYSNO: 4, destory a specified env with the id of envid.
  • sys_exofork πŸ”’
    SYSNO: 9, fork a new env which will be the child of the current env.
  • sys_getenvid πŸ”’
    SYSNO: 2, get the EnvData::id or the pid. (a.k.a in Linux) of the current env.
  • sys_ipc_recv πŸ”’
    SYSNO: 14, wait for a ipc-message.
  • sys_ipc_try_send πŸ”’
    SYSNO: 13, Try to send a ipc-message to the target env.
  • sys_lock πŸ”’
    SYSNO: 20, lock a specified memory pool.
  • sys_mem_alloc πŸ”’
    SYSNO: 6, alloc a page and map it to va.
  • sys_mem_map πŸ”’
    SYSNO: 7, map a page from one env (src_id) to another (dst_id).
  • sys_mem_unmap πŸ”’
    SYSNO: 8, cancel the map of the specified virtual address for the specified env.
  • sys_panic πŸ”’
    SYSNO: 12, trigger the kernel’s panic with the given C-Style string.
  • sys_print_cons πŸ”’
    SYSNO: 1, show one num-lengthed string on the console.
  • sys_putchar πŸ”’
    SYSNO: 0, just show a character on the console.
  • sys_read_dev πŸ”’
    SYSNO: 17, read data from pa into va with the length of len.
  • SYSNO: 10, set the run status of the specified env.
  • SYSNO: 5, set the specified env’s user_tlb_mod_entry.
  • SYSNO: 11, set the trapframe of the specified env.
  • sys_unlock πŸ”’
    SYSNO: 21, unlock a memory pool.
  • sys_write_dev πŸ”’
    SYSNO: 16, write data at va into pa with the length of len.
  • sys_yield πŸ”’
    SYSNO: 3, give out the CPU, re-schedule. NO-RETURN

Type AliasesΒ§