mirror of
https://github.com/justinian/jsix.git
synced 2025-12-11 00:44:31 -08:00
[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:
@@ -2,6 +2,8 @@
|
||||
#include "cpu.h"
|
||||
#include "debug.h"
|
||||
#include "gdt.h"
|
||||
#include "objects/process.h"
|
||||
#include "objects/thread.h"
|
||||
#include "page_manager.h"
|
||||
|
||||
size_t __counter_syscall_enter = 0;
|
||||
@@ -15,6 +17,9 @@ print_regs(const cpu_state ®s)
|
||||
uint64_t cr2 = 0;
|
||||
__asm__ __volatile__ ("mov %%cr2, %0" : "=r"(cr2));
|
||||
|
||||
cons->printf(" process: %llx", bsp_cpu_data.p->koid());
|
||||
cons->printf(" thread: %llx\n", bsp_cpu_data.t->koid());
|
||||
|
||||
print_regL("rax", regs.rax);
|
||||
print_regM("rbx", regs.rbx);
|
||||
print_regR("rcx", regs.rcx);
|
||||
|
||||
Reference in New Issue
Block a user