Module thread

Module thread 

Source
Expand description

(SysT) Thread related syscalls and operations

Functions§

exit
Exits the current thread, threads don’t have an exit code however if the thread was the last thread in the process, then the process will exit with code code
sleep
Sleeps for a given duration
spawn
Spawns a thread as a child of self
spawn2
Spawns a thread as a child of self unlike spawn, instead of taking a reference as an argument to pass to the thread, this will take a usize
spawn3
Spawns a thread as a child of self unlike spawn, this will pass no arguments to the thread
syst_exit
Exits the current thread, threads don’t have an exit code however if the thread was the last thread in the process, then the process will exit with code [code]
syst_sleep
Sleeps for N ms
syst_spawn_raw
Spawns a thread at the entry point entry_point with the config config
syst_wait
Waits for a child thread with the cid cid to exit
sysyield
Switches to the next thread in the thread queue of the current CPU
wait
Waits for the thread with the id cid to exit
yield_now
Switches to the next thread in the thread queue of the current CPU