diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-31 20:33:57 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-31 20:33:57 +0200 |
| commit | 21a0081ac9d9a8abe66cc6a248b5363768de1dc9 (patch) | |
| tree | a96f53d3eff8ec4e7e44cfa4610f38c664a1fefe /dev/ZKA/Sources | |
| parent | a8eacc4a5d7f89b497b8be552491dba26fa68162 (diff) | |
[IMP] Fixed many stuff in user-mode switch, working on finishing it and
adding timer interrupts.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
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(); |
