Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 3.23 KB

File metadata and controls

35 lines (27 loc) · 3.23 KB

Kernel API

SyscallRAX 0-7RAX 8-15RAX 16-31RAX 32-63RDIRSIRDXDescription
fork_thread0Creates a new thread
exit_thread1Terminates the calling thread
debug_write2ptrlenPrints direct to screen. Will be removed
receive3Wait for a message
send4Send a message
send_receive5Send and wait for reply from receiving thread
open6ptrlenOpen a mounted filesystem
malloc7Allocate a chunk of memory pages
free8Deallocate a chunk of pages
yield9Puts current thread back into the scheduler
new_rendezvous10Creates a new pair of Rendezvous handles
copy_rendezvous11Copies a Rendezvous handle
exec12flagsparam_lenbin_lenbin_ptrstdin/stdoutvfs_ptrCreate a new process
mount13Mount a Rendezvous into the process’ VFS
list_mounts14List all mounted paths in the process’ VFS
umount15ptrlenRemove a Rendezvous from the VFS
close16Close a Rendezvous handle
await_interrupt17Wait until a hardware interrupt occurs

Thread and process management

New processes are created with exec

Processes can create new threads with the fork_thread system call

Threads can exit with the exit_thread syscall. Unlike Linux (for example) there is no “main” thread: All threads are treated the same, and the process stops when the last thread exits.