diff options
| author | amlal <amlal@el-mahrouss-logic.com> | 2024-03-08 12:35:05 +0000 |
|---|---|---|
| committer | amlal <amlal@el-mahrouss-logic.com> | 2024-03-08 12:43:36 +0000 |
| commit | 6f5eddc17785607e1cd5e8245d576874f1939beb (patch) | |
| tree | dbc1f113be4e90b0de8de6916c7bd5084f6f604b /Private/KernelKit | |
| parent | 842d35cdd8511adf379c4ccb52010b9b71e0757f (diff) | |
HCR-14: Fixes and improvements.
Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/KernelKit')
| -rw-r--r-- | Private/KernelKit/CodeManager.hpp | 15 | ||||
| -rw-r--r-- | Private/KernelKit/PEFCodeManager.hxx | 10 | ||||
| -rw-r--r-- | Private/KernelKit/ProcessManager.hpp | 22 | ||||
| -rw-r--r-- | Private/KernelKit/ProcessTeam.hpp | 28 |
4 files changed, 38 insertions, 37 deletions
diff --git a/Private/KernelKit/CodeManager.hpp b/Private/KernelKit/CodeManager.hpp index 4bbbc350..ed42517a 100644 --- a/Private/KernelKit/CodeManager.hpp +++ b/Private/KernelKit/CodeManager.hpp @@ -8,6 +8,7 @@ Revision History: 30/01/24: Added file (amlel) + 3/8/24: Add UPP struct. ------------------------------------------- */ @@ -16,3 +17,17 @@ #include <KernelKit/PECodeManager.hxx> #include <KernelKit/PEFCodeManager.hxx> #include <KernelKit/PEFSharedObject.hxx> + +#define kUPPNameLen 64 + +namespace HCore { +/// \brief Much like Mac OS's UPP. +/// This is read-only by design. +/// It handles different kind of code. +/// ARM <-> AMD64 for example. +typedef struct UniversalProcedureTable final { + const Char NAME[kUPPNameLen]; + const VoidPtr TRAP; + const SizeT ARCH; +} PACKED UniversalProcedureTableType; +} // namespace HCore
\ No newline at end of file diff --git a/Private/KernelKit/PEFCodeManager.hxx b/Private/KernelKit/PEFCodeManager.hxx index a4bc08eb..73bc8ea3 100644 --- a/Private/KernelKit/PEFCodeManager.hxx +++ b/Private/KernelKit/PEFCodeManager.hxx @@ -52,16 +52,6 @@ class PEFLoader : public Loader { }; namespace Utils { -/// \brief Much like Mac OS's UPP. -/// This is read-only by design. -/// It handles different kind of code. -/// ARM <-> AMD64 for example. -typedef struct UniversalProcedureTable final { - const Char NAME[kPefNameLen]; - const VoidPtr TRAP; - const SizeT ARCH; -} PACKED UniversalProcedureTableType; - bool execute_from_image(PEFLoader &exec) noexcept; } // namespace Utils } // namespace HCore diff --git a/Private/KernelKit/ProcessManager.hpp b/Private/KernelKit/ProcessManager.hpp index d7a3d39e..0eb3f80e 100644 --- a/Private/KernelKit/ProcessManager.hpp +++ b/Private/KernelKit/ProcessManager.hpp @@ -24,6 +24,10 @@ //////////////////////////////////////////////////// namespace HCore { +class Process; +class ProcessTeam; +class ProcessManager; + //! @brief Process identifier. typedef Int64 ProcessID; @@ -180,6 +184,24 @@ class Process final { friend ProcessHelper; }; +/// \brief Processs Team (contains multiple processes inside it.) +/// Equivalent to a process batch +class ProcessTeam final { +public: + explicit ProcessTeam() = default; + ~ProcessTeam() = default; + + HCORE_COPY_DEFAULT(ProcessTeam); + + MutableArray<Ref<Process>>& AsArray() { return mProcessList; } + Ref<Process>& AsRef() { return mCurrentProcess; } + +public: + MutableArray<Ref<Process>> mProcessList; + Ref<Process> mCurrentProcess; + +}; + using ProcessPtr = Process *; //! @brief Kernel scheduler.. diff --git a/Private/KernelKit/ProcessTeam.hpp b/Private/KernelKit/ProcessTeam.hpp index 1fb78d1d..31759ff6 100644 --- a/Private/KernelKit/ProcessTeam.hpp +++ b/Private/KernelKit/ProcessTeam.hpp @@ -6,30 +6,4 @@ #pragma once -#include <ArchKit/ArchKit.hpp> -#include <KernelKit/FileManager.hpp> -#include <KernelKit/PermissionSelector.hxx> -#include <NewKit/LockDelegate.hpp> -#include <NewKit/MutableArray.hpp> -#include <NewKit/UserHeap.hpp> - -/// kernel namespace -namespace HCore { -/// \brief Processs Team (contains multiple processes inside it.) -/// Equivalent to a process batch -class ProcessTeam final { -public: - explicit ProcessTeam() = default; - ~ProcessTeam() = default; - - HCORE_COPY_DEFAULT(ProcessTeam); - - MutableArray<Ref<Process>>& AsArray() { return mProcessList; } - Ref<Process>& AsRef() { return mCurrentProcess; } - -public: - MutableArray<Ref<Process>> mProcessList; - Ref<Process> mCurrentProcess; - -}; -} // namespace HCore
\ No newline at end of file +#include <KernelKit/ProcessManager.hpp>
\ No newline at end of file |
