From 6dcf5b87da65de2254d6102f567183eaeca03088 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sat, 26 Oct 2024 19:49:02 +0200 Subject: IMP: This commit contains fixes and improvements regarding the kernel, a next one will be done soon. Signed-off-by: Amlal --- dev/zka/src/CodeMgr.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dev/zka/src/CodeMgr.cc') diff --git a/dev/zka/src/CodeMgr.cc b/dev/zka/src/CodeMgr.cc index 130f8cfe..c855347b 100644 --- a/dev/zka/src/CodeMgr.cc +++ b/dev/zka/src/CodeMgr.cc @@ -4,8 +4,8 @@ ------------------------------------------- */ -#include #include +#include #include namespace Kernel @@ -14,20 +14,20 @@ namespace Kernel /// @note This sets up a new stack, anything on the main function that calls the Kernel will not be accessible. /// @param main the start of the process. /// @return if the process was started or not. - Bool sched_execute_thread(MainKind main, const Char* process_name) noexcept + SizeT rtl_create_process(MainKind main, const Char* process_name) noexcept { if (!main) return No; UserProcess proc; - proc.SetImageStart(reinterpret_cast(main)); + proc.Image = reinterpret_cast(main); proc.Kind = UserProcess::kExectuableKind; proc.StackSize = kib_cast(32); rt_set_memory(proc.Name, 0, kProcessLen); rt_copy_memory((VoidPtr)process_name, proc.Name, rt_string_len(process_name)); - return UserProcessScheduler::The().Add(proc) > 0; + return UserProcessScheduler::The().Add(proc); } } // namespace Kernel -- cgit v1.2.3