summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/src/CodeMgr.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-02 19:38:46 +0200
committerGitHub <noreply@github.com>2025-05-02 19:38:46 +0200
commit997be16e5ac9a68d54882ab69529815860d62955 (patch)
tree19d6129c2d776bb1edc5d4a7325e39ca176c3403 /dev/kernel/src/CodeMgr.cc
parent618104e74c195d7508a18450524f8ed7f9af8cc6 (diff)
parentb3b4b1ebdcd6adeac914869017c86d892b7a8ced (diff)
Merge pull request #28 from nekernel-org/dev
0.0.2
Diffstat (limited to 'dev/kernel/src/CodeMgr.cc')
-rw-r--r--dev/kernel/src/CodeMgr.cc33
1 files changed, 15 insertions, 18 deletions
diff --git a/dev/kernel/src/CodeMgr.cc b/dev/kernel/src/CodeMgr.cc
index 3604df30..c4ac011c 100644
--- a/dev/kernel/src/CodeMgr.cc
+++ b/dev/kernel/src/CodeMgr.cc
@@ -1,28 +1,25 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
------------------------------------------- */
#include <KernelKit/CodeMgr.h>
-#include <NewKit/Utils.h>
#include <KernelKit/ProcessScheduler.h>
+#include <NewKit/Utils.h>
-namespace Kernel
-{
- /***********************************************************************************/
- /// @brief Executes a new process from a function. Kernel code only.
- /// @note This sets up a new stack, anything on the main function that calls the Kernel will not be accessible.
- /// @param main the start of the process.
- /// @return if the process was started or not.
- /***********************************************************************************/
+namespace Kernel {
+/***********************************************************************************/
+/// @brief Executes a new process from a function. Kernel code only.
+/// @note This sets up a new stack, anything on the main function that calls the Kernel will not be
+/// accessible.
+/// @param main the start of the process.
+/// @return if the process was started or not.
+/***********************************************************************************/
- ProcessID rtl_create_user_process(rtl_main_kind main, const Char* process_name) noexcept
- {
- if (!process_name ||
- *process_name == 0)
- return kSchedInvalidPID;
+ProcessID rtl_create_user_process(rtl_main_kind main, const Char* process_name) noexcept {
+ if (!process_name || *process_name == 0) return kSchedInvalidPID;
- return UserProcessScheduler::The().Spawn(process_name, reinterpret_cast<VoidPtr>(main), nullptr);
- }
-} // namespace Kernel
+ return UserProcessScheduler::The().Spawn(process_name, reinterpret_cast<VoidPtr>(main), nullptr);
+}
+} // namespace Kernel