summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/Sources
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-09-06 16:16:07 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-09-06 16:16:07 +0200
commitd7897106bb99a082a2066b2948a823da7059c755 (patch)
treee75968246bceddae0210d8d478a2ee7a92e58985 /dev/ZKA/Sources
parent607b9fe59c1caefa58d7272702b0668e2a9192a4 (diff)
Fix Global Scheduler and fixing ring-3 switch on non MP Scheduler.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/ZKA/Sources')
-rw-r--r--dev/ZKA/Sources/HardwareThreadScheduler.cxx5
-rw-r--r--dev/ZKA/Sources/UserProcessScheduler.cxx2
2 files changed, 3 insertions, 4 deletions
diff --git a/dev/ZKA/Sources/HardwareThreadScheduler.cxx b/dev/ZKA/Sources/HardwareThreadScheduler.cxx
index 134cbb0f..47c71192 100644
--- a/dev/ZKA/Sources/HardwareThreadScheduler.cxx
+++ b/dev/ZKA/Sources/HardwareThreadScheduler.cxx
@@ -107,12 +107,11 @@ namespace Kernel
}
else
{
- kcout << "Switching...\r";
+ kcout << "Switching to task...\r";
- mp_do_context_switch_pre();
mp_do_context_switch(image, stack_ptr, fStack);
- return true;
+ return Yes;
}
}
diff --git a/dev/ZKA/Sources/UserProcessScheduler.cxx b/dev/ZKA/Sources/UserProcessScheduler.cxx
index 2501afc2..a2541d57 100644
--- a/dev/ZKA/Sources/UserProcessScheduler.cxx
+++ b/dev/ZKA/Sources/UserProcessScheduler.cxx
@@ -335,7 +335,7 @@ namespace Kernel
kcout << process.Name << ": will be runned.\r";
// tell helper to find a core to schedule on.
- if (!UserProcessHelper::Switch(process.Image, &process.StackReserve[process.StackSize], process.StackFrame,
+ if (!UserProcessHelper::Switch(process.Image, &process.StackReserve[process.StackSize - 1], process.StackFrame,
process.ProcessId))
{
process.Crash();