summaryrefslogtreecommitdiffhomepage
path: root/Kernel/KernelKit/ProcessScheduler.hxx
diff options
context:
space:
mode:
authorAmlal <amlal@zka.com>2024-07-20 08:43:16 +0200
committerAmlal <amlal@zka.com>2024-07-20 08:43:16 +0200
commit650fee520f526d9cd5ffa75735bd94d5140dd247 (patch)
tree5967c57a2e754c0f46bccfba40a915a680dcaa10 /Kernel/KernelKit/ProcessScheduler.hxx
parent81b284cacb03b34ae259c485ac874b02c8ecba69 (diff)
[IMP] See below.
- Revoke OTA flag for now inside bootloader (newosldr #4) - Rework Comm as SCI (System Call Interface) (newoskrnl #3) - Rework and fix some parts of the scheduler (newoskrnl #2) - Return from thread when region is zero (newosldr #1) - Separate allocation functions and c++ runtime from each other. (DDK #5) - Rename kHartStandard to kStandard (newoskrnl #6) Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Kernel/KernelKit/ProcessScheduler.hxx')
-rw-r--r--Kernel/KernelKit/ProcessScheduler.hxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx
index cbce2ec2..3f6e7828 100644
--- a/Kernel/KernelKit/ProcessScheduler.hxx
+++ b/Kernel/KernelKit/ProcessScheduler.hxx
@@ -13,7 +13,7 @@
#include <KernelKit/ProcessHeap.hxx>
#include <NewKit/MutableArray.hpp>
-#define kSchedMinMicroTime (AffinityKind::kHartStandard)
+#define kSchedMinMicroTime (AffinityKind::kStandard)
#define kSchedInvalidPID (-1)
#define kSchedProcessLimitPerTeam (16U)
@@ -58,7 +58,7 @@ namespace Kernel
kInvalid = 300,
kVeryHigh = 250,
kHigh = 200,
- kHartStandard = 150,
+ kStandard = 150,
kLowUsage = 100,
kVeryLowUsage = 50,
};
@@ -167,7 +167,7 @@ namespace Kernel
kKindCount,
};
- ProcessTime PTime;
+ ProcessTime PTime{0};
PID ProcessId{kSchedInvalidPID};
Int32 Kind{kAppKind};
@@ -178,25 +178,29 @@ namespace Kernel
return Status != ProcessStatus::kDead;
}
- //! @brief Crash the app, exits with code ~0.
+ ///! @brief Crashes the app, exits with code ~0.
Void Crash();
- //! @brief Exits app.
+ ///! @brief Exits the app.
Void Exit(Int32 exitCode = 0);
- //! @brief TLS Allocate
+ ///! @brief TLS allocate.
+ ///! @param sz size of new ptr.
VoidPtr New(const SizeT& sz);
- //! @brief TLS Free.
+ ///! @brief TLS free.
+ ///! @param ptr the pointer to free.
+ ///! @param sz the size of it.
Boolean Delete(VoidPtr ptr, const SizeT& sz);
- //! @brief Wakes up threads.
+ ///! @brief Wakes up threads.
Void Wake(const bool wakeup = false);
// ProcessHeader getters.
public:
- //! @brief ProcessHeader name getter, example: "C RunTime"
- const Char* GetName() noexcept;
+ ///! @brief Get the process's name
+ ///! @example 'C Runtime Library'
+ const Char* GetProcessName() noexcept;
//! @brief return local error code of process.
//! @return Int32 local error code.