diff options
Diffstat (limited to 'dev/kernel/src/UserProcessScheduler.cc')
| -rw-r--r-- | dev/kernel/src/UserProcessScheduler.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/dev/kernel/src/UserProcessScheduler.cc b/dev/kernel/src/UserProcessScheduler.cc index 56b41436..5f627dd5 100644 --- a/dev/kernel/src/UserProcessScheduler.cc +++ b/dev/kernel/src/UserProcessScheduler.cc @@ -37,8 +37,8 @@ namespace Kernel STATIC UserProcessScheduler kProcessScheduler; - UserProcess::UserProcess() = default; - UserProcess::~UserProcess() = default; + Process::Process() = default; + Process::~Process() = default; /// @brief Gets the last exit code. /// @note Not thread-safe. @@ -53,7 +53,7 @@ namespace Kernel /// @brief Crashes the current process. /***********************************************************************************/ - Void UserProcess::Crash() + Void Process::Crash() { if (this->Status != ProcessStatusKind::kRunning) return; @@ -66,7 +66,7 @@ namespace Kernel /// @brief boolean operator, check status. /***********************************************************************************/ - UserProcess::operator bool() + Process::operator bool() { return this->Status == ProcessStatusKind::kRunning; } @@ -77,7 +77,7 @@ namespace Kernel /// @return Int32 the last exit code. /***********************************************************************************/ - const UInt32& UserProcess::GetExitCode() noexcept + const UInt32& Process::GetExitCode() noexcept { return this->fLastExitCode; } @@ -86,7 +86,7 @@ namespace Kernel /// @brief Error code variable getter. /***********************************************************************************/ - Int32& UserProcess::GetLocalCode() noexcept + Int32& Process::GetLocalCode() noexcept { return this->fLocalCode; } @@ -96,7 +96,7 @@ namespace Kernel /// @param should_wakeup if the program shall wakeup or not. /***********************************************************************************/ - Void UserProcess::Wake(Bool should_wakeup) + Void Process::Wake(Bool should_wakeup) { this->Status = should_wakeup ? ProcessStatusKind::kRunning : ProcessStatusKind::kFrozen; @@ -106,7 +106,7 @@ namespace Kernel /** @brief Allocate pointer to track list. */ /***********************************************************************************/ - ErrorOr<VoidPtr> UserProcess::New(SizeT sz, SizeT pad_amount) + ErrorOr<VoidPtr> Process::New(SizeT sz, SizeT pad_amount) { #ifdef __NE_VIRTUAL_MEMORY_SUPPORT__ auto vm_register = hal_read_cr3(); @@ -159,7 +159,7 @@ namespace Kernel /// @brief Gets the name of the current process. /***********************************************************************************/ - const Char* UserProcess::GetName() noexcept + const Char* Process::GetName() noexcept { return this->Name; } @@ -168,13 +168,13 @@ namespace Kernel /// @brief Gets the owner of the process. /***********************************************************************************/ - const User* UserProcess::GetOwner() noexcept + const User* Process::GetOwner() noexcept { return this->Owner; } - /// @brief UserProcess status getter. - const ProcessStatusKind& UserProcess::GetStatus() noexcept + /// @brief Process status getter. + const ProcessStatusKind& Process::GetStatus() noexcept { return this->Status; } @@ -185,7 +185,7 @@ namespace Kernel */ /***********************************************************************************/ - const AffinityKind& UserProcess::GetAffinity() noexcept + const AffinityKind& Process::GetAffinity() noexcept { return this->Affinity; } @@ -197,7 +197,7 @@ namespace Kernel */ /***********************************************************************************/ - Void UserProcess::Exit(const Int32& exit_code) + Void Process::Exit(const Int32& exit_code) { this->Status = exit_code > 0 ? ProcessStatusKind::kKilled : ProcessStatusKind::kFrozen; this->fLastExitCode = exit_code; @@ -294,7 +294,7 @@ namespace Kernel ++this->mTeam.mProcessCount; - UserProcess& process = this->mTeam.mProcessList[pid]; + Process& process = this->mTeam.mProcessList[pid]; process.Image.fCode = code; process.Image.fBlob = image; @@ -336,7 +336,7 @@ namespace Kernel // React according to process kind. switch (process.Kind) { - case UserProcess::kExectuableDylibKind: { + case Process::kExectuableDylibKind: { process.DylibDelegate = rtl_init_dylib(process); MUST_PASS(process.DylibDelegate); break; @@ -472,7 +472,7 @@ namespace Kernel /// @brief Gets the current scheduled team. /// @return - UserProcessTeam& UserProcessScheduler::CurrentTeam() + ProcessTeam& UserProcessScheduler::CurrentTeam() { return mTeam; } @@ -481,13 +481,13 @@ namespace Kernel /// @brief Gets current running process. /// @return - Ref<UserProcess>& UserProcessScheduler::CurrentProcess() + Ref<Process>& UserProcessScheduler::CurrentProcess() { return mTeam.AsRef(); } /// @brief Current proccess id getter. - /// @return UserProcess ID integer. + /// @return Process ID integer. ErrorOr<PID> UserProcessHelper::TheCurrentPID() { if (!kProcessScheduler.CurrentProcess()) @@ -501,7 +501,7 @@ namespace Kernel /// @param process the process reference. /// @retval true can be schedulded. /// @retval false cannot be schedulded. - Bool UserProcessHelper::CanBeScheduled(const UserProcess& process) + Bool UserProcessHelper::CanBeScheduled(const Process& process) { if (process.Status == ProcessStatusKind::kKilled || process.Status == ProcessStatusKind::kFinished || |
