summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/ProcessManager.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-03-08 11:45:31 +0000
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-03-08 11:45:31 +0000
commit842d35cdd8511adf379c4ccb52010b9b71e0757f (patch)
tree5d49b59f49d633fe10aaf416056b2a413f60f1e8 /Private/KernelKit/ProcessManager.hpp
parentdb0c8756f85c4a1f1f7770b704528d135ed765b9 (diff)
HCR-14:
- Improve kernel scheduler. - Defined a ProcessTeam object. - Define an entrypoint for a PE personality as a helper macro.
Diffstat (limited to 'Private/KernelKit/ProcessManager.hpp')
-rw-r--r--Private/KernelKit/ProcessManager.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/Private/KernelKit/ProcessManager.hpp b/Private/KernelKit/ProcessManager.hpp
index 277a2985..d7a3d39e 100644
--- a/Private/KernelKit/ProcessManager.hpp
+++ b/Private/KernelKit/ProcessManager.hpp
@@ -9,6 +9,7 @@
#include <ArchKit/ArchKit.hpp>
#include <KernelKit/FileManager.hpp>
+#include <KernelKit/ProcessTeam.hpp>
#include <KernelKit/PermissionSelector.hxx>
#include <NewKit/LockDelegate.hpp>
#include <NewKit/MutableArray.hpp>
@@ -191,11 +192,13 @@ class ProcessManager final {
HCORE_COPY_DEFAULT(ProcessManager)
- operator bool() { return m_Headers.Count() > 0; }
- bool operator!() { return m_Headers.Count() == 0; }
+ operator bool() { return mTeam.AsArray().Count() > 0; }
+ bool operator!() { return mTeam.AsArray().Count() == 0; }
- bool Add(Ref<Process> &Header);
- bool Remove(SizeT Header);
+ ProcessTeam& CurrentTeam() { return mTeam; }
+
+ SizeT Add(Ref<Process> &headerRef);
+ bool Remove(SizeT headerIndex);
Ref<Process> &GetCurrent();
SizeT Run() noexcept;
@@ -203,8 +206,7 @@ class ProcessManager final {
static Ref<ProcessManager> Shared();
private:
- MutableArray<Ref<Process>> m_Headers;
- Ref<Process> m_CurrentProcess;
+ ProcessTeam mTeam;
};
/*