Kernel: Cleanup process creation for userspace

This commit is contained in:
Bananymous
2023-04-22 16:43:44 +03:00
parent 33d8c518e9
commit 7530482cc2
8 changed files with 47 additions and 70 deletions

View File

@@ -23,13 +23,13 @@ namespace Kernel
using entry_t = Thread::entry_t;
public:
static BAN::ErrorOr<Process*> create_kernel(entry_t, void*);
static Process* create_kernel(entry_t, void*);
static BAN::ErrorOr<Process*> create_userspace(BAN::StringView);
~Process();
[[noreturn]] void exit();
BAN::ErrorOr<Thread*> add_thread(entry_t, void*);
void add_thread(Thread*);
void on_thread_exit(Thread&);
BAN::ErrorOr<void> init_stdio();
@@ -60,6 +60,7 @@ namespace Kernel
private:
Process(pid_t);
static Process* create_process();
static void register_process(Process*);
BAN::ErrorOr<BAN::String> absolute_path_of(BAN::StringView) const;

View File

@@ -27,6 +27,7 @@ namespace Kernel
public:
static BAN::ErrorOr<Thread*> create(entry_t, void*, Process*);
static BAN::ErrorOr<Thread*> create_userspace(uintptr_t, Process*);
~Thread();
void jump_userspace(uintptr_t rip);