mirror of
https://github.com/RGBCube/serenity
synced 2025-05-26 01:55:08 +00:00
Kernel: Make sure we free the thread stack on thread exit
This adds two new arguments to the thread_exit system call which let a thread unmap an arbitrary VM range on thread exit. LibPthread uses this functionality to unmap the thread stack. Fixes #7267.
This commit is contained in:
parent
95c2166ca9
commit
42d667645d
4 changed files with 22 additions and 9 deletions
|
@ -379,7 +379,7 @@ public:
|
|||
KResultOr<int> sys$sched_setparam(pid_t pid, Userspace<const struct sched_param*>);
|
||||
KResultOr<int> sys$sched_getparam(pid_t pid, Userspace<struct sched_param*>);
|
||||
KResultOr<int> sys$create_thread(void* (*)(void*), Userspace<const Syscall::SC_create_thread_params*>);
|
||||
[[noreturn]] void sys$exit_thread(Userspace<void*>);
|
||||
[[noreturn]] void sys$exit_thread(Userspace<void*>, Userspace<void*>, size_t);
|
||||
KResultOr<int> sys$join_thread(pid_t tid, Userspace<void**> exit_value);
|
||||
KResultOr<int> sys$detach_thread(pid_t tid);
|
||||
KResultOr<int> sys$set_thread_name(pid_t tid, Userspace<const char*> buffer, size_t buffer_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue