summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/KernelKit/ProcessScheduler.hxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-24 17:30:52 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-08-24 17:30:52 +0200
commitfdc8aaab2ad3c2f2f3f4bb4ffb71bc2d797366aa (patch)
treeda3e628e1c4862c424a2deebae6966d6fc262592 /dev/ZKA/KernelKit/ProcessScheduler.hxx
parent30e5aa322bf253cdf48cddf53a1c8a1e9720e705 (diff)
[IMP] Better kernel design.
+ If the process has a parent, and it's exited, that means that the thread must go down as well. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/KernelKit/ProcessScheduler.hxx')
-rw-r--r--dev/ZKA/KernelKit/ProcessScheduler.hxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/dev/ZKA/KernelKit/ProcessScheduler.hxx b/dev/ZKA/KernelKit/ProcessScheduler.hxx
index 810886ab..826f8a89 100644
--- a/dev/ZKA/KernelKit/ProcessScheduler.hxx
+++ b/dev/ZKA/KernelKit/ProcessScheduler.hxx
@@ -125,7 +125,8 @@ namespace Kernel
using HeapPtrKind = VoidPtr;
/// @name PROCESS_HEADER_BLOCK
- /// @brief Process Header (PHB). Holds information about the running process. Thread execution the THREAD_INFORMATION_BLOCK.
+ /// @brief Process Header Block (PHB).
+ /// Holds information about the running process/thread.
struct PROCESS_HEADER_BLOCK final
{
public:
@@ -145,7 +146,7 @@ namespace Kernel
public:
Char Name[kProcessLen] = {"PROCESS #0 (TEAM 0)"};
ProcessSubsystem SubSystem{ProcessSubsystem::eProcessSubsystemInvalid};
- ProcessLevelRing Selector{ProcessLevelRing::kRingStdUser};
+ User* AssignedOwner{nullptr};
HAL::StackFramePtr StackFrame{nullptr};
AffinityKind Affinity{AffinityKind::kStandard};
ProcessStatus Status{ProcessStatus::kDead};
@@ -158,6 +159,8 @@ namespace Kernel
// shared library handle, reserved for kSharedObjectKind types of executables only.
PEFSharedObjectInterface* DLLPtr{nullptr};
+ PROCESS_HEADER_BLOCK* Parent{nullptr};
+
// Memory usage.
SizeT UsedMemory{0};
SizeT FreeMemory{0};
@@ -209,7 +212,7 @@ namespace Kernel
//! @return Int32 local error code.
Int32& GetLocalCode() noexcept;
- const ProcessLevelRing& GetLevelRing() noexcept;
+ const User* GetOwner() noexcept;
const ProcessStatus& GetStatus() noexcept;
const AffinityKind& GetAffinity() noexcept;