summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 00:22:39 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 00:22:39 +0200
commit9b7082353e9f7bd4d3ae077959de553f437316db (patch)
tree2643c513389dfda8373941f5417b1a89043de367
parentab69a596a336d9874555672a154c4f48e0ed1020 (diff)
Kernel fixes and improvements.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
-rw-r--r--dev/ZKA/Sources/DLLMain.cxx4
-rw-r--r--dev/ZKA/Sources/MP.cxx6
-rw-r--r--dev/ZKA/Sources/Network/IPC.cxx9
3 files changed, 12 insertions, 7 deletions
diff --git a/dev/ZKA/Sources/DLLMain.cxx b/dev/ZKA/Sources/DLLMain.cxx
index c6ec3739..d8edeaaf 100644
--- a/dev/ZKA/Sources/DLLMain.cxx
+++ b/dev/ZKA/Sources/DLLMain.cxx
@@ -52,7 +52,7 @@ namespace Kernel::Detail
{
if (Kernel::FilesystemManagerInterface::GetMounted())
{
- CG::CGDrawStringToWnd(cKernelWnd, "newoskrnl.dll: NewFS IFS already mounted by HAL (A:)...", 10, 10, RGB(0, 0, 0));
+ CG::CGDrawStringToWnd(cKernelWnd, "newoskrnl.dll: NewFS IFS already mounted by HAL (A:)", 10, 10, RGB(0, 0, 0));
fNewFS = reinterpret_cast<Kernel::NewFilesystemManager*>(Kernel::FilesystemManagerInterface::GetMounted());
}
else
@@ -62,7 +62,7 @@ namespace Kernel::Detail
Kernel::FilesystemManagerInterface::Mount(fNewFS);
- CG::CGDrawStringToWnd(cKernelWnd, "newoskrnl.dll: Mounted NewFS IFS (A:)...", 10, 10, RGB(0, 0, 0));
+ CG::CGDrawStringToWnd(cKernelWnd, "newoskrnl.dll: Mounted NewFS IFS (A:)", 10, 10, RGB(0, 0, 0));
}
const Kernel::SizeT cDirCount = 7UL;
diff --git a/dev/ZKA/Sources/MP.cxx b/dev/ZKA/Sources/MP.cxx
index b0716e77..9c7a47f3 100644
--- a/dev/ZKA/Sources/MP.cxx
+++ b/dev/ZKA/Sources/MP.cxx
@@ -91,13 +91,13 @@ namespace Kernel
/// @retval false stack is invalid, previous code is running.
Bool HardwareThread::Switch(VoidPtr image, UInt8* stack_ptr, HAL::StackFramePtr frame)
{
- fStack = frame;
-
- if (!fStack ||
+ if (!frame ||
!image ||
!stack_ptr)
return false;
+ fStack = frame;
+
auto ret = mp_register_process(fStack);
if (!ret)
diff --git a/dev/ZKA/Sources/Network/IPC.cxx b/dev/ZKA/Sources/Network/IPC.cxx
index 34b08b88..97702cbe 100644
--- a/dev/ZKA/Sources/Network/IPC.cxx
+++ b/dev/ZKA/Sources/Network/IPC.cxx
@@ -92,14 +92,19 @@ namespace Kernel
if (*pckt_in)
{
- (*pckt_in)->IpcHeaderMagic = cXPCOMHeaderMagic;
-
auto endian = DEDUCE_ENDIAN((*pckt_in), ((Char*)(*pckt_in))[0]);
+ (*pckt_in)->IpcHeaderMagic = cXPCOMHeaderMagic;
+
(*pckt_in)->IpcEndianess = static_cast<UInt8>(endian);
(*pckt_in)->IpcPacketSize = sizeof(IPC_MESSAGE_STRUCT);
+
+ (*pckt_in)->IpcTo.UserProcessID = 0;
+ (*pckt_in)->IpcTo.UserProcessTeam = 0;
+
(*pckt_in)->IpcFrom.UserProcessID = Kernel::UserProcessScheduler::The().CurrentProcess().Leak().ProcessId;
(*pckt_in)->IpcFrom.UserProcessTeam = Kernel::UserProcessScheduler::The().CurrentTeam().mTeamId;
+
return true;
}