summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/ProcessScheduler.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-27 17:38:23 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-27 17:38:23 +0100
commit1ce16b83dba0326b13dfa3399c1497ac6b1af14d (patch)
tree8a5e4063b5d4cf6ce4f42dd500073994e9ef8954 /Private/KernelKit/ProcessScheduler.hpp
parent6a18e607ffc4e83f2bd953c9de5c14f18e077df8 (diff)
Kernel && Developer:
Developer: - Rework System API to use C instead of C++ - Add new calls in Thread.h - Documented code. Kernel: - Rework handover stage, separated the Processor specific code from the cross platform code. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/KernelKit/ProcessScheduler.hpp')
-rw-r--r--Private/KernelKit/ProcessScheduler.hpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/Private/KernelKit/ProcessScheduler.hpp b/Private/KernelKit/ProcessScheduler.hpp
index 4f499033..1b55be4a 100644
--- a/Private/KernelKit/ProcessScheduler.hpp
+++ b/Private/KernelKit/ProcessScheduler.hpp
@@ -121,7 +121,7 @@ class ProcessHeader final {
HCORE_COPY_DEFAULT(ProcessHeader)
public:
- void SetStart(UIntPtr &imageStart) noexcept;
+ void SetEntrypoint(UIntPtr &imageStart) noexcept;
public:
Char Name[kProcessLen] = {"HCore Process"};
@@ -141,22 +141,27 @@ class ProcessHeader final {
SizeT FreeMemory{0};
enum {
- ExecutableType,
- DLLType,
- DriverType,
- TypeCount,
+ kUserKind = 3,
+ kLibKind = 3,
+ kDriverKind = 0,
+ kKindCount,
+ };
+
+ enum {
+ kRingUserKind = 3,
+ kRingDriverKind = 0,
};
ProcessTime PTime;
- PID ProcessId{-1};
- Int32 Ring{3};
- Int32 Kind{0};
+ PID ProcessId{kPIDInvalid};
+ Int32 Ring{kRingDriverKind};
+ Int32 Kind{kUserKind};
public:
//! @brief boolean operator, check status.
operator bool() { return Status != ProcessStatus::kDead; }
- //! @brief Crash app, exits with code ~0.
+ //! @brief Crash the app, exits with code ~0.
void Crash();
//! @brief Exits app.