summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/zka/src/URL.cxx2
-rw-r--r--dev/zka/src/UserProcessScheduler.cxx23
-rw-r--r--dev/zka/src/UserProcessTeam.cxx11
3 files changed, 33 insertions, 3 deletions
diff --git a/dev/zka/src/URL.cxx b/dev/zka/src/URL.cxx
index e10310f5..9748ba32 100644
--- a/dev/zka/src/URL.cxx
+++ b/dev/zka/src/URL.cxx
@@ -29,7 +29,7 @@ namespace Kernel
};
constexpr const int kUrlOutSz = 1; //! such as: ://
- constexpr const int kProtosCount = 5;
+ constexpr const int kProtosCount = 5; //! Number of protocols registered as of right now.
constexpr const int kRangeSz = 4096;
ErrorOr<StringView> url_extract_location(const Char* url)
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()
{
diff --git a/dev/zka/src/UserProcessTeam.cxx b/dev/zka/src/UserProcessTeam.cxx
index bb5726f7..1ae206e8 100644
--- a/dev/zka/src/UserProcessTeam.cxx
+++ b/dev/zka/src/UserProcessTeam.cxx
@@ -13,22 +13,31 @@
namespace Kernel
{
+ /***********************************************************************************/
/// @brief UserProcess list array getter.
/// @return The list of process to schedule.
+ /***********************************************************************************/
+
Array<UserProcess, kSchedProcessLimitPerTeam>& UserProcessTeam::AsArray()
{
return mProcessList;
}
+ /***********************************************************************************/
/// @brief Get team ID.
/// @return The team's ID.
+ /***********************************************************************************/
+
ProcessID& UserProcessTeam::Id() noexcept
{
return mTeamId;
}
- /// @brief Current process getter.
+ /***********************************************************************************/
+ /// @brief Get current process getter as Ref.
/// @return The current process header.
+ /***********************************************************************************/
+
Ref<UserProcess>& UserProcessTeam::AsRef()
{
return mCurrentProcess;