From c142fe6fda7d09e929c9706b444cdc13ed5e72f3 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Fri, 28 Jun 2024 08:26:19 +0200 Subject: IMP: Feature Pack #1 - Process scheduler. - System calls. - ACPI support. - Driver kit. - Filesystem support. - Program loader. - newstd/herror APIs. Signed-off-by: Amlal EL Mahrouss --- Kernel/KernelKit/ProcessScheduler.hxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Kernel/KernelKit/ProcessScheduler.hxx') diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx index 98008d69..11555b1d 100644 --- a/Kernel/KernelKit/ProcessScheduler.hxx +++ b/Kernel/KernelKit/ProcessScheduler.hxx @@ -141,7 +141,8 @@ namespace NewOS NEWOS_COPY_DEFAULT(ProcessHeader) public: - void SetEntrypoint(UIntPtr& imageStart) noexcept; + void SetEntrypoint(UIntPtr& imageStart) noexcept; + const Int32& GetExitCode() noexcept; public: Char Name[kProcessLen] = {"Process"}; @@ -179,30 +180,32 @@ namespace NewOS } //! @brief Crash the app, exits with code ~0. - void Crash(); + Void Crash(); //! @brief Exits app. - void Exit(Int32 exitCode = 0); + Void Exit(Int32 exitCode = 0); //! @brief TLS Allocate - VoidPtr New(const SizeT& sz); + VoidPtr New(const SizeT& sz); //! @brief TLS Free. - Boolean Delete(VoidPtr ptr, const SizeT& sz); + Boolean Delete(VoidPtr ptr, const SizeT& sz); //! @brief Wakes up threads. - void Wake(const bool wakeup = false); + Void Wake(const bool wakeup = false); // ProcessHeader getters. public: //! @brief ProcessHeader name getter, example: "C RunTime" - const Char* GetName(); + const Char* GetName(); const ProcessSelector& GetSelector(); const ProcessStatus& GetStatus(); const AffinityKind& GetAffinity(); private: + Int32 fLastExitCode{0}; + friend ProcessScheduler; friend ProcessHelper; }; -- cgit v1.2.3