[kernel] Add userspace threading

Implement the syscalls necessary for threads to create other threads in
their same process. This involved rearranging a number of syscalls, as
well as implementing object_wait and a basic implementation of a
process' list of handles.
This commit is contained in:
2020-07-26 16:02:38 -07:00
parent 4cf222a5bb
commit ae3290c53d
22 changed files with 481 additions and 255 deletions

View File

@@ -1,8 +1,14 @@
SYSCALL(0x00, object_noop, void)
SYSCALL(0x01, object_wait, j6_handle_t, j6_signal_t, j6_signal_t *)
SYSCALL(0x00, system_log, const char *)
SYSCALL(0x01, system_noop, void)
SYSCALL(0x09, object_wait, j6_handle_t, j6_signal_t, j6_signal_t *)
SYSCALL(0x10, process_koid, j6_koid_t *)
SYSCALL(0x11, process_exit, int64_t)
SYSCALL(0x12, process_log, const char *)
SYSCALL(0x13, process_pause, void)
SYSCALL(0x14, process_sleep, uint64_t)
SYSCALL(0x18, thread_koid, j6_koid_t *)
SYSCALL(0x19, thread_create, void *, j6_handle_t *)
SYSCALL(0x1a, thread_exit, int64_t)
SYSCALL(0x1b, thread_pause, void)
SYSCALL(0x1c, thread_sleep, uint64_t)