summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-04 19:23:48 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-04 19:23:48 +0200
commit770b1034a8f1bc401251ebbbeb8af82568829f09 (patch)
tree1130dcc08167438f40189cbeff05d14125a04e09 /Private/KernelKit
parentfd7b08906adf40b81f3ac758ca55da501cb2283d (diff)
MHR-23: Improve code and add a ProcessSubsystem inside the scheduler.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit')
-rw-r--r--Private/KernelKit/LoaderInterface.hpp2
-rw-r--r--Private/KernelKit/PEFCodeManager.hxx2
-rw-r--r--Private/KernelKit/ProcessScheduler.hpp11
3 files changed, 11 insertions, 4 deletions
diff --git a/Private/KernelKit/LoaderInterface.hpp b/Private/KernelKit/LoaderInterface.hpp
index 09d0d7b5..97a12938 100644
--- a/Private/KernelKit/LoaderInterface.hpp
+++ b/Private/KernelKit/LoaderInterface.hpp
@@ -22,7 +22,7 @@ class LoaderInterface {
NEWOS_COPY_DEFAULT(LoaderInterface);
public:
- virtual _Output const char* Format() = 0;
+ virtual _Output const char* FormatAsString() = 0;
virtual _Output const char* MIME() = 0;
virtual _Output const char* Path() = 0;
virtual _Output ErrorOr<VoidPtr> FindStart() = 0;
diff --git a/Private/KernelKit/PEFCodeManager.hxx b/Private/KernelKit/PEFCodeManager.hxx
index a928e89e..2d8517cb 100644
--- a/Private/KernelKit/PEFCodeManager.hxx
+++ b/Private/KernelKit/PEFCodeManager.hxx
@@ -32,7 +32,7 @@ class PEFLoader : public LoaderInterface {
public:
const char *Path() override;
- const char *Format() override;
+ const char *FormatAsString() override;
const char *MIME() override;
public:
diff --git a/Private/KernelKit/ProcessScheduler.hpp b/Private/KernelKit/ProcessScheduler.hpp
index 3085713f..3c080b15 100644
--- a/Private/KernelKit/ProcessScheduler.hpp
+++ b/Private/KernelKit/ProcessScheduler.hpp
@@ -93,7 +93,14 @@ inline bool operator>=(AffinityKind lhs, AffinityKind rhs) {
// end of operator overloading.
-using ProcessSubsystem = UInt32;
+enum ProcessSubsystemEnum {
+ eProcessSubsystemLogin,
+ eProcessSubsystemNative,
+ eProcessSubsystemInvalid,
+ eProcessSubsystemCount,
+};
+
+using ProcessSubsystem = ProcessSubsystemEnum;
using ProcessTime = UInt64;
using PID = Int64;
@@ -127,7 +134,7 @@ class ProcessHeader final {
public:
Char Name[kProcessLen] = {"NewOS Process"};
- ProcessSubsystem SubSystem{0};
+ ProcessSubsystem SubSystem{ProcessSubsystem::eProcessSubsystemInvalid};
ProcessSelector Selector{ProcessSelector::kRingUser};
HAL::StackFramePtr StackFrame{nullptr};
AffinityKind Affinity;