summaryrefslogtreecommitdiffhomepage
path: root/dev/zka/src/UserProcessScheduler.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <zka-holder@mahrouss-logic.com>2024-10-06 06:14:51 +0000
committerAmlal El Mahrouss <zka-holder@mahrouss-logic.com>2024-10-06 06:14:51 +0000
commit135cf9abf4996e0ddbbbdaeaee33441bbbe2ca25 (patch)
tree29d662d7d99336f31d683043e4fd566328e2367e /dev/zka/src/UserProcessScheduler.cxx
parentdb459bf711b21c9f1f0712625b441b100bf9cead (diff)
IMP: Improve Kernel's documentation.
Diffstat (limited to 'dev/zka/src/UserProcessScheduler.cxx')
-rw-r--r--dev/zka/src/UserProcessScheduler.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/dev/zka/src/UserProcessScheduler.cxx b/dev/zka/src/UserProcessScheduler.cxx
index 9f0a5a3f..00249896 100644
--- a/dev/zka/src/UserProcessScheduler.cxx
+++ b/dev/zka/src/UserProcessScheduler.cxx
@@ -59,15 +59,21 @@ namespace Kernel
this->Exit(kErrorProcessFault);
}
+ /***********************************************************************************/
//! @brief boolean operator, check status.
+ /***********************************************************************************/
+
UserProcess::operator bool()
{
return this->Status != ProcessStatusKind::kDead;
}
+ /***********************************************************************************/
/// @brief Gets the local last exit code.
/// @note Not thread-safe.
/// @return Int32 the last exit code.
+ /***********************************************************************************/
+
const UInt32& UserProcess::GetExitCode() noexcept
{
return this->fLastExitCode;
@@ -82,6 +88,10 @@ namespace Kernel
return fLocalCode;
}
+ /***********************************************************************************/
+ /// @brief Wake process.
+ /***********************************************************************************/
+
void UserProcess::Wake(const bool should_wakeup)
{
this->Status =
@@ -175,13 +185,19 @@ namespace Kernel
return No;
}
- /// @brief Gets the name of the current process..
+ /***********************************************************************************/
+ /// @brief Gets the name of the current process.
+ /***********************************************************************************/
+
const Char* UserProcess::GetProcessName() noexcept
{
return this->Name;
}
+ /***********************************************************************************/
/// @brief Gets the owner of the process.
+ /***********************************************************************************/
+
const User* UserProcess::GetOwner() noexcept
{
return this->Owner;
@@ -247,9 +263,12 @@ namespace Kernel
UserProcessScheduler::The().Remove(this->ProcessId);
}
+ /***********************************************************************************/
/// @brief Add process to list.
/// @param process the process *Ref* class.
/// @return the process index inside the team.
+ /***********************************************************************************/
+
SizeT UserProcessScheduler::Add(UserProcess process)
{
if (mTeam.mProcessAmount > kSchedProcessLimitPerTeam)
@@ -309,6 +328,8 @@ namespace Kernel
}
/***********************************************************************************/
+ /// @brief Retrieves the singleton of the process scheduler.
+ /***********************************************************************************/
UserProcessScheduler& UserProcessScheduler::The()
{