Kernel: Fix Thread destruction after sys_exit

This had undefined behaviour as Thread's (Processes's) PageTable was
destroyed before Thread had the change to destroy its own stacks that
lived on the PageTable.
This commit is contained in:
2024-11-26 00:59:34 +02:00
parent 48e030bca3
commit 88a86a9927
3 changed files with 6 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ namespace Kernel
static Process* create_kernel(entry_t, void*);
static BAN::ErrorOr<Process*> create_userspace(const Credentials&, BAN::StringView path, BAN::Span<BAN::StringView> arguments);
~Process();
void cleanup_function();
void cleanup_function(Thread*);
void register_to_scheduler();
void exit(int status, int signal);