diff options
Diffstat (limited to 'dev/ZKA/Sources')
| -rw-r--r-- | dev/ZKA/Sources/DLLMain.cxx | 4 | ||||
| -rw-r--r-- | dev/ZKA/Sources/UserProcessScheduler.cxx | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/dev/ZKA/Sources/DLLMain.cxx b/dev/ZKA/Sources/DLLMain.cxx index e8436411..e4352a00 100644 --- a/dev/ZKA/Sources/DLLMain.cxx +++ b/dev/ZKA/Sources/DLLMain.cxx @@ -39,6 +39,8 @@ EXTERN Kernel::Property cKernelVersion; STATIC CG::UI_WINDOW_STRUCT* cKernelWnd = nullptr; +EXTERN_C void hal_switch_to_user_code(void); + namespace Kernel::Detail { /// @brief Filesystem auto formatter, additional checks are also done by the class. @@ -213,6 +215,8 @@ EXTERN_C Kernel::Void ke_dll_entrypoint(Kernel::Void) CG::CGDrawStringToWnd(cKernelWnd, kSysDrv, 20, 10 + (FONT_SIZE_X * Kernel::rt_string_len("newoskrnl.dll: Missing catalog: ")), RGB(0, 0, 0)); } + hal_switch_to_user_code(); + while (Yes) { Kernel::ProcessHelper::StartScheduling(); diff --git a/dev/ZKA/Sources/UserProcessScheduler.cxx b/dev/ZKA/Sources/UserProcessScheduler.cxx index b762f1cd..2d018b33 100644 --- a/dev/ZKA/Sources/UserProcessScheduler.cxx +++ b/dev/ZKA/Sources/UserProcessScheduler.cxx @@ -341,7 +341,7 @@ namespace Kernel kcout << process.Name << ": will be runned.\r"; // tell helper to find a core to schedule on. - if (!ProcessHelper::Switch(process.Image, process.StackReserve, process.StackFrame, + if (!ProcessHelper::Switch(process.Image, &process.StackReserve[process.StackSize - 1], process.StackFrame, process.ProcessId)) { process.Crash(); |
