diff options
| author | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-15 13:49:07 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-15 13:49:07 +0200 |
| commit | f05b598a1c1a8ca4f1bf0acca078f9c9e3c07991 (patch) | |
| tree | 38c9175fe1d297c332fe0d8ee76fb4a28c4bde4a /Kernel | |
| parent | 999877265276c8a5ae78eb01c92d1d9928a13576 (diff) | |
kernel: include assembly files as well in project.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
Diffstat (limited to 'Kernel')
| -rw-r--r-- | Kernel/CFKit/Property.hpp | 20 | ||||
| -rw-r--r-- | Kernel/FSKit/IndexableProperty.hxx | 5 | ||||
| -rw-r--r-- | Kernel/KernelKit/ProcessScheduler.hxx | 2 | ||||
| -rw-r--r-- | Kernel/Sources/IndexableProperty.cxx | 12 | ||||
| -rw-r--r-- | Kernel/Sources/KeMain.cxx | 10 | ||||
| -rw-r--r-- | Kernel/Sources/ProcessScheduler.cxx | 8 | ||||
| -rw-r--r-- | Kernel/Sources/Property.cxx | 8 |
7 files changed, 35 insertions, 30 deletions
diff --git a/Kernel/CFKit/Property.hpp b/Kernel/CFKit/Property.hpp index 7667194f..5c5aeb8f 100644 --- a/Kernel/CFKit/Property.hpp +++ b/Kernel/CFKit/Property.hpp @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef _INC_PLIST_HPP__ -#define _INC_PLIST_HPP__ +#ifndef __INC_PLIST_HPP__ +#define __INC_PLIST_HPP__ #include <NewKit/Array.hpp> #include <NewKit/Defines.hpp> @@ -14,18 +14,16 @@ namespace NewOS { - using PropertyId = Int; + /// @brief handle to anything (number, ptr, string...) + using PropertyId = UIntPtr; /// @brief Kernel property class. + /// @example \Properties\SmpCores or \Properties\KernelVersion class Property { public: - explicit Property(const StringView& sw) - : fName(sw) - { - } - - virtual ~Property() = default; + explicit Property(const StringView& sw); + virtual ~Property(); public: Property& operator=(const Property&) = default; @@ -39,8 +37,8 @@ namespace NewOS PropertyId fAction; }; - template <SSizeT N> + template <SizeT N> using PropertyArray = Array<Property, N>; } // namespace NewOS -#endif // !_INC_PLIST_HPP__ +#endif // !__INC_PLIST_HPP__ diff --git a/Kernel/FSKit/IndexableProperty.hxx b/Kernel/FSKit/IndexableProperty.hxx index 91b90903..892083a2 100644 --- a/Kernel/FSKit/IndexableProperty.hxx +++ b/Kernel/FSKit/IndexableProperty.hxx @@ -24,11 +24,12 @@ namespace NewOS Char Path[kIndexerNodeNameLength]; }; + class IndexableProperty final : public Property { public: explicit IndexableProperty() - : Property(StringBuilder::Construct("Indexable").Leak().Leak()) + : Property(StringBuilder::Construct("\\Filesystem\\IsIndexable?").Leak().Leak()) { } @@ -37,7 +38,7 @@ namespace NewOS NEWOS_COPY_DEFAULT(IndexableProperty); public: - IndexProperty& LeakProperty() noexcept; + IndexProperty& Leak() noexcept; public: void AddFlag(Int16 flag); diff --git a/Kernel/KernelKit/ProcessScheduler.hxx b/Kernel/KernelKit/ProcessScheduler.hxx index 637fc8c4..f49292f1 100644 --- a/Kernel/KernelKit/ProcessScheduler.hxx +++ b/Kernel/KernelKit/ProcessScheduler.hxx @@ -269,7 +269,7 @@ namespace NewOS static bool Switch(HAL::StackFrame* newStack, const PID& newPid); static bool CanBeScheduled(Ref<ProcessHeader>& process); static PID& GetCurrentPID(); - static bool StartScheduling(); + static SizeT StartScheduling(); }; const Int32& rt_get_exit_code() noexcept; diff --git a/Kernel/Sources/IndexableProperty.cxx b/Kernel/Sources/IndexableProperty.cxx index a687e0ec..457e2c53 100644 --- a/Kernel/Sources/IndexableProperty.cxx +++ b/Kernel/Sources/IndexableProperty.cxx @@ -20,19 +20,21 @@ namespace NewOS { namespace Indexer { - IndexProperty& IndexableProperty::LeakProperty() noexcept + IndexProperty& IndexableProperty::Leak() noexcept { return fIndex; } - void IndexableProperty::AddFlag(Int16 flag) + Void IndexableProperty::AddFlag(Int16 flag) { fFlags |= flag; } - void IndexableProperty::RemoveFlag(Int16 flag) + + Void IndexableProperty::RemoveFlag(Int16 flag) { fFlags &= flag; } + Int16 IndexableProperty::HasFlag(Int16 flag) { return fFlags & flag; @@ -48,9 +50,9 @@ namespace NewOS if (!indexer.HasFlag(kIndexerClaimed)) { indexer.AddFlag(kIndexerClaimed); - rt_copy_memory((VoidPtr)indexer.LeakProperty().Path, (VoidPtr)filename, filenameLen); + rt_copy_memory((VoidPtr)indexer.Leak().Path, (VoidPtr)filename, filenameLen); - kcout << "newoskrnl: FSKit: index new file: " << filename << endl; + kcout << "newoskrnl: filesystem: index new file: " << filename << endl; } } } // namespace Indexer diff --git a/Kernel/Sources/KeMain.cxx b/Kernel/Sources/KeMain.cxx index 23e32c1d..e1b347b8 100644 --- a/Kernel/Sources/KeMain.cxx +++ b/Kernel/Sources/KeMain.cxx @@ -182,9 +182,9 @@ namespace NewOS::Detail /// @brief System loader entrypoint. /// @param void no parameters. /// @return void no return value. - STATIC NewOS::Void SystemLauncher_Main(NewOS::Void) + STATIC NewOS::Void ke_launch_srv(NewOS::Void) { - NewOS::PEFLoader lockScreen("\\System\\LockScreen"); + NewOS::PEFLoader lockScreen("\\System\\securesrv.exe"); if (!lockScreen.IsLoaded()) { @@ -194,7 +194,7 @@ namespace NewOS::Detail NewOS::Utils::execute_from_image(lockScreen, NewOS::ProcessHeader::kAppKind); - NewOS::PEFLoader stageBoard("\\System\\StageBoard"); + NewOS::PEFLoader stageBoard("\\System\\uisrv.exe"); if (!stageBoard.IsLoaded()) { @@ -212,9 +212,9 @@ namespace NewOS::Detail EXTERN_C NewOS::Void KeMain(NewOS::Void) { /// Now run kernel loop, until no process are running. - NewOS::Detail::FilesystemWizard wizard; // automatic. + NewOS::Detail::FilesystemWizard wizard; // automatic filesystem creation. - NewOS::Detail::SystemLauncher_Main(); + NewOS::Detail::ke_launch_srv(); // fetch system cores. NewOS::HAL::hal_system_get_cores(kHandoverHeader->f_HardwareTables.f_RsdPtr); diff --git a/Kernel/Sources/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx index dc273cf6..d232c72e 100644 --- a/Kernel/Sources/ProcessScheduler.cxx +++ b/Kernel/Sources/ProcessScheduler.cxx @@ -329,16 +329,12 @@ namespace NewOS * @brief Spin scheduler class. */ - bool ProcessHelper::StartScheduling() + SizeT ProcessHelper::StartScheduling() { auto& process_ref = ProcessScheduler::The().Leak(); SizeT ret = process_ref.Run(); - kcout << "newoskrnl: Iterated over: "; - kcout.Number(ret); - kcout << " processes.\r"; - - return true; + return ret; } /** diff --git a/Kernel/Sources/Property.cxx b/Kernel/Sources/Property.cxx index dca34429..b58de469 100644 --- a/Kernel/Sources/Property.cxx +++ b/Kernel/Sources/Property.cxx @@ -8,6 +8,14 @@ namespace NewOS { + Property::Property(const StringView& sw) + : fName(sw) + { + kcout << "Property: created: " << sw.CData() << endl; + } + + Property::~Property() = default; + bool Property::StringEquals(StringView& name) { return fName && this->fName == name; |
