Kernel/LibC: Allocate thread stacks in userspace

This adds support for pthread function for stack manipulation.

Also keep track of main threads stack in the uthread
This commit is contained in:
2026-07-02 19:43:55 +03:00
parent 7bdd9d19d0
commit 0dc74beb0f
5 changed files with 51 additions and 25 deletions

View File

@@ -209,7 +209,7 @@ namespace Kernel
BAN::ErrorOr<long> sys_set_gsbase(void*);
BAN::ErrorOr<long> sys_get_gsbase();
BAN::ErrorOr<long> sys_thread_create(void (*entry)(void*), void* arg);
BAN::ErrorOr<long> sys_thread_create(void (*entry)(void*), void* arg, void* stack_base, size_t stack_size);
BAN::ErrorOr<long> sys_thread_exit(void* value);
BAN::ErrorOr<long> sys_thread_join(pid_t tid, void** value);
BAN::ErrorOr<long> sys_thread_getid();