diff options
Diffstat (limited to 'dev/ZKA/KernelKit')
| -rw-r--r-- | dev/ZKA/KernelKit/ProcessScheduler.hxx | 9 | ||||
| -rw-r--r-- | dev/ZKA/KernelKit/ThreadLocalStorage.hxx | 9 | ||||
| -rw-r--r-- | dev/ZKA/KernelKit/User.hxx | 21 |
3 files changed, 8 insertions, 31 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; diff --git a/dev/ZKA/KernelKit/ThreadLocalStorage.hxx b/dev/ZKA/KernelKit/ThreadLocalStorage.hxx index afc4940f..115a4ca1 100644 --- a/dev/ZKA/KernelKit/ThreadLocalStorage.hxx +++ b/dev/ZKA/KernelKit/ThreadLocalStorage.hxx @@ -23,13 +23,8 @@ struct THREAD_INFORMATION_BLOCK; /// Located in GS on AMD64, other architectures have their own stuff. (64x0, 32x0, ARM64) struct PACKED THREAD_INFORMATION_BLOCK final { - Kernel::Char f_Cookie[kTLSCookieLen]; // Process cookie. - Kernel::UIntPtr f_Code; // Start address (Instruction Pointer) - Kernel::UIntPtr f_Data; // Allocated Heap for process. - Kernel::UIntPtr f_Stack; // Application Stack pointer. - Kernel::Int32 f_ID; // Thread execution ID. - Kernel::Int64 f_UsedHeapPercent; // used heap in percent. - Kernel::Int64 f_FreeHeapPercent; // heap free in percent. + Kernel::Char f_Cookie[kTLSCookieLen]{0}; // Thread magic number. + Kernel::VoidPtr f_ThreadRecord{nullptr}; }; ///! @brief Cookie Sanity check. diff --git a/dev/ZKA/KernelKit/User.hxx b/dev/ZKA/KernelKit/User.hxx index 4686135f..a7f8fc02 100644 --- a/dev/ZKA/KernelKit/User.hxx +++ b/dev/ZKA/KernelKit/User.hxx @@ -77,27 +77,6 @@ namespace Kernel friend UserManager; }; - - class UserManager final - { - private: - UserManager() = default; - ~UserManager() = default; - - User* fCurrentUser{nullptr}; - - public: - User* fRootUser{nullptr}; - - public: - ZKA_COPY_DELETE(UserManager); - - STATIC UserManager* The() noexcept; - Bool TryLogIn(User& user, const Char* password, const Char* right_password) noexcept; - Bool TryLogIn(User& user, const Char* password) noexcept; - User* GetCurrent() noexcept; - Void TryLogOff() noexcept; - }; } // namespace Kernel #endif /* ifndef _INC_USER_HXX_ */ |
