summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Source/AppMain.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-10 07:06:43 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-10 07:06:43 +0200
commit84b0e780dfd9272b177c32cc3bb99f37bb88304d (patch)
tree44d596f6511eae83b8762aa42550b100d5646de6 /Kernel/Source/AppMain.cxx
parent915c14eb3b717bbd168d069e296a4246c6aef117 (diff)
MHR-23: Getting SMP to work...
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Source/AppMain.cxx')
-rw-r--r--Kernel/Source/AppMain.cxx39
1 files changed, 32 insertions, 7 deletions
diff --git a/Kernel/Source/AppMain.cxx b/Kernel/Source/AppMain.cxx
index 4f5de11f..028e70e5 100644
--- a/Kernel/Source/AppMain.cxx
+++ b/Kernel/Source/AppMain.cxx
@@ -179,25 +179,50 @@ namespace Detail
}
};
- STATIC NewOS::Void AppWatchdogThread(NewOS::Void)
+ /// @brief System loader entrypoint.
+ /// @param void no parameters.
+ /// @return void no return value.
+ STATIC NewOS::Void AppSystemLoader(NewOS::Void)
{
- NewOS::kcout << "SystemSanityThread: Exiting process...";
+ NewOS::PEFLoader coreGraphicsShLib("/System/CoreGraphics");
+
+ if (!coreGraphicsShLib.IsLoaded())
+ {
+ NewOS::ke_stop(RUNTIME_CHECK_FAILED);
+ }
+
+ NewOS::Utils::execute_from_image(coreGraphicsShLib,
+ NewOS::ProcessHeader::kLibKind);
+
+ NewOS::PEFLoader logonService("/System/Login");
+
+ if (!logonService.IsLoaded())
+ {
+ NewOS::ke_stop(RUNTIME_CHECK_FAILED);
+ }
+
+ NewOS::Utils::execute_from_image(logonService,
+ NewOS::ProcessHeader::kAppKind);
+
+ NewOS::kcout << "SystemLoader: Exiting process, we're done initializing stuff...";
+
NewOS::ProcessScheduler::Shared().Leak().GetCurrent().Leak().Exit(0);
}
} // namespace Detail
-/// @file Main microkernel entrypoint.
-
+/// @brief Application entrypoint.
+/// @param Void
+/// @return Void
EXTERN_C NewOS::Void AppMain(NewOS::Void)
{
/// Now run kernel loop, until no process are running.
Detail::FilesystemWizard wizard; // automatic.
- auto cWatchdogThreadName = "SystemSanityThread";
- NewOS::execute_from_image((NewOS::MainKind)Detail::AppWatchdogThread, cWatchdogThreadName);
+ auto cLoaderName = "SystemLoader";
+ NewOS::execute_from_image(Detail::AppSystemLoader, cLoaderName);
while (NewOS::ProcessScheduler::Shared().Leak().Run() > 0)
{
- ;
+ NewOS::kcout << "New OS: sleeping...\r";
}
}