diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 19:38:51 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 19:42:30 +0100 |
| commit | c6c908167e37e0f82e272f6f9fd6462c0dd4502c (patch) | |
| tree | cb5b6337cc413da9c95e9aa0406ed023b6ce9614 /Private/KernelKit | |
| parent | 2f7c48ef9172ba48fa177600a12ab0d51cb9e566 (diff) | |
Kernel: Last refactor of the kernel.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit')
| -rw-r--r-- | Private/KernelKit/CodeManager.hpp | 4 | ||||
| -rw-r--r-- | Private/KernelKit/FileManager.hpp | 4 | ||||
| -rw-r--r-- | Private/KernelKit/Timer.hpp | 16 |
3 files changed, 12 insertions, 12 deletions
diff --git a/Private/KernelKit/CodeManager.hpp b/Private/KernelKit/CodeManager.hpp index 04d5647b..f470bb01 100644 --- a/Private/KernelKit/CodeManager.hpp +++ b/Private/KernelKit/CodeManager.hpp @@ -59,14 +59,14 @@ namespace hCore /// This is read-only by design. /// It handles different kind of code. /// PowerPC <-> AMD64 for example. - typedef struct UniversalProcedureTable + typedef struct UniversalProcedureTable final { const Char NAME[kPefNameLen]; const VoidPtr TRAP; const SizeT ARCH; } __attribute__((packed)) UniversalProcedureTableType; - bool execute_from_image(PEFLoader& exec); + bool execute_from_image(PEFLoader& exec) noexcept; } } diff --git a/Private/KernelKit/FileManager.hpp b/Private/KernelKit/FileManager.hpp index 311527f9..04055815 100644 --- a/Private/KernelKit/FileManager.hpp +++ b/Private/KernelKit/FileManager.hpp @@ -136,7 +136,7 @@ namespace hCore ErrorOr<Int64> WriteAll(const VoidPtr data) noexcept { if (data == nullptr) - return ErrorOr<Int64>(ME_INVALID_DATA); + return ErrorOr<Int64>(H_INVALID_DATA); auto man = FSClass::GetMounted(); @@ -146,7 +146,7 @@ namespace hCore return ErrorOr<Int64>(0); } - return ErrorOr<Int64>(ME_INVALID_DATA); + return ErrorOr<Int64>(H_INVALID_DATA); } VoidPtr ReadAll() noexcept diff --git a/Private/KernelKit/Timer.hpp b/Private/KernelKit/Timer.hpp index 32559ee3..6e694ceb 100644 --- a/Private/KernelKit/Timer.hpp +++ b/Private/KernelKit/Timer.hpp @@ -16,24 +16,24 @@ namespace hCore { - class ITimer; class HardwareTimer; + class HardwareTimerInterface; - class ITimer + class HardwareTimerInterface { public: - ITimer() = default; - virtual ~ITimer() = default; + HardwareTimerInterface() = default; + virtual ~HardwareTimerInterface() = default; public: - HCORE_COPY_DEFAULT(ITimer); + HCORE_COPY_DEFAULT(HardwareTimerInterface); public: - virtual Int32 Wait() { return ME_UNIMPLEMENTED; } + virtual Int32 Wait() noexcept; }; - class HardwareTimer final : public ITimer + class HardwareTimer final : public HardwareTimerInterface { public: explicit HardwareTimer(Int64 seconds); @@ -43,7 +43,7 @@ namespace hCore HCORE_COPY_DEFAULT(HardwareTimer); public: - Int32 Wait() override; + Int32 Wait() noexcept override; public: IntPtr* fDigitalTimer{ nullptr }; |
