From ffa1c9bd15768cbc5f176935e0e6d72e97c3e0ba Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Sun, 30 Jun 2024 05:06:48 +0200 Subject: amd64-efi.make: Fix makefile: Add necessary macros and detect windows correctly. DebugOutput.hpp: Use default destructor for TerminalDevice, rename NUMBERS to cNumbers. NewFS.cxx/ProcessScheduler.hxx: Just code improvements here. Signed-off-by: Amlal EL Mahrouss --- Kernel/KernelKit/DebugOutput.hpp | 10 ++++++---- Kernel/KernelKit/ProcessScheduler.hxx | 10 +++++----- Kernel/Sources/FS/NewFS.cxx | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'Kernel') diff --git a/Kernel/KernelKit/DebugOutput.hpp b/Kernel/KernelKit/DebugOutput.hpp index f5c402db..05865661 100644 --- a/Kernel/KernelKit/DebugOutput.hpp +++ b/Kernel/KernelKit/DebugOutput.hpp @@ -125,10 +125,10 @@ namespace NewOS if (y < 0) y = -y; - const char NUMBERS[11] = "0123456789"; + const char cNumbers[11] = "0123456789"; Char buf[2]; - buf[0] = NUMBERS[h]; + buf[0] = cNumbers[h]; buf[1] = 0; term << buf; @@ -153,10 +153,10 @@ namespace NewOS if (y < 0) y = -y; - const char NUMBERS[17] = "0123456789ABCDEF"; + const char cNumbers[17] = "0123456789ABCDEF"; Char buf[2]; - buf[0] = NUMBERS[h]; + buf[0] = cNumbers[h]; buf[1] = 0; term << buf; @@ -186,7 +186,9 @@ namespace NewOS inline TerminalDevice& get_console_in(Char* buf) { TerminalDevice& selfTerm = TerminalDevice::The(); + selfTerm >> buf; + return selfTerm; } diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx index 51a1563f..b8ac2aae 100644 --- a/Kernel/KernelKit/ProcessScheduler.hxx +++ b/Kernel/KernelKit/ProcessScheduler.hxx @@ -262,7 +262,7 @@ namespace NewOS SizeT Run() noexcept; public: - static Ref The(); + STATIC Ref The(); private: ProcessTeam mTeam; @@ -275,10 +275,10 @@ namespace NewOS class ProcessHelper final { public: - static bool Switch(HAL::StackFrame* newStack, const PID& newPid); - static bool CanBeScheduled(Ref& process); - static PID& TheCurrentPID(); - static SizeT StartScheduling(); + STATIC bool Switch(HAL::StackFrame* newStack, const PID& newPid); + STATIC bool CanBeScheduled(Ref& process); + STATIC PID& TheCurrentPID(); + STATIC SizeT StartScheduling(); }; const Int32& rt_get_exit_code() noexcept; diff --git a/Kernel/Sources/FS/NewFS.cxx b/Kernel/Sources/FS/NewFS.cxx index 5ede2ef7..79121018 100644 --- a/Kernel/Sources/FS/NewFS.cxx +++ b/Kernel/Sources/FS/NewFS.cxx @@ -561,7 +561,7 @@ bool NewFSParser::WriteCatalog(_Input _Output NewCatalog* catalog, voidPtr data, drive->fInput(&drive->fPacket); - kcout << "newoskrnl: forkName: " << forkData->ForkName << endl; + kcout << "newoskrnl: fork name: " << forkData->ForkName << endl; /// sanity check the fork. if (forkData->DataOffset <= kNewFSCatalogStartAddress) -- cgit v1.2.3