diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc | 12 | ||||
| -rw-r--r-- | src/kernel/KernelKit/IFS.h | 8 | ||||
| -rw-r--r-- | src/kernel/KernelKit/TraceSrv.h | 3 | ||||
| -rw-r--r-- | src/kernel/KernelKit/UserProcessScheduler.h | 4 | ||||
| -rw-r--r-- | src/kernel/NeKit/Json.h | 8 | ||||
| -rw-r--r-- | src/kernel/NeKit/TOML.h | 9 |
6 files changed, 25 insertions, 19 deletions
diff --git a/src/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc b/src/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc index 3c18e837..a9bbb044 100644 --- a/src/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc +++ b/src/kernel/HALKit/ARM64/HalCoreInterruptHandler.cc @@ -27,7 +27,7 @@ STATIC void hal_int_send_eoi(UInt8 vector) { /// @brief Handle GPF fault. /// @param rsp EXTERN_C Kernel::Void int_handle_gpf(Kernel::UIntPtr rsp) { - auto& process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); + auto process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); process.Leak().Crash(); hal_int_send_eoi(13); @@ -40,7 +40,7 @@ EXTERN_C Kernel::Void int_handle_gpf(Kernel::UIntPtr rsp) { /// @brief Handle page fault. /// @param rsp EXTERN_C void int_handle_pf(Kernel::UIntPtr rsp) { - auto& process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); + auto process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); process.Leak().Crash(); hal_int_send_eoi(14); @@ -68,7 +68,7 @@ EXTERN_C void int_handle_scheduler(Kernel::UIntPtr rsp) { /// @brief Handle math fault. /// @param rsp EXTERN_C void int_handle_math(Kernel::UIntPtr rsp) { - auto& process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); + auto process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); process.Leak().Crash(); hal_int_send_eoi(8); @@ -81,7 +81,7 @@ EXTERN_C void int_handle_math(Kernel::UIntPtr rsp) { /// @brief Handle any generic fault. /// @param rsp EXTERN_C void int_handle_generic(Kernel::UIntPtr rsp) { - auto& process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); + auto process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); process.Leak().Crash(); hal_int_send_eoi(30); @@ -96,7 +96,7 @@ EXTERN_C void int_handle_generic(Kernel::UIntPtr rsp) { } EXTERN_C Kernel::Void int_handle_breakpoint(Kernel::UIntPtr rip) { - auto& process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); + auto process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); hal_int_send_eoi(3); @@ -111,7 +111,7 @@ EXTERN_C Kernel::Void int_handle_breakpoint(Kernel::UIntPtr rip) { /// @brief Handle #UD fault. /// @param rsp EXTERN_C void int_handle_ud(Kernel::UIntPtr rsp) { - auto& process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); + auto process = Kernel::UserProcessScheduler::The().TheCurrentProcess(); process.Leak().Crash(); hal_int_send_eoi(6); diff --git a/src/kernel/KernelKit/IFS.h b/src/kernel/KernelKit/IFS.h index 7118a935..c885d350 100644 --- a/src/kernel/KernelKit/IFS.h +++ b/src/kernel/KernelKit/IFS.h @@ -13,13 +13,13 @@ namespace Kernel { /// @param Mnt mounted interface. /// @param DrvTrait drive info /// @param DrvIndex drive index. -/// @return -Int32 fs_ifs_read(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex); +/// @return Status code +Int32 fs_ifs_read(IMountpoint* mnt, DriveTrait& drvTrait, Int32 drvIndex); /// @brief Write to IFS disk. /// @param Mnt mounted interface. /// @param DrvTrait drive info /// @param DrvIndex drive index. -/// @return -Int32 fs_ifs_write(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex); +/// @return Status code +Int32 fs_ifs_write(IMountpoint* mnt, DriveTrait& drvTrait, Int32 drvIndex); } // namespace Kernel diff --git a/src/kernel/KernelKit/TraceSrv.h b/src/kernel/KernelKit/TraceSrv.h index 276e9f2b..389357ec 100644 --- a/src/kernel/KernelKit/TraceSrv.h +++ b/src/kernel/KernelKit/TraceSrv.h @@ -14,12 +14,11 @@ namespace Kernel { namespace Detail { inline constexpr auto kDebugCmdLen = 256U; inline constexpr auto kDebugPort = 51820; + /// \brief Debug Magic Value inline constexpr auto kDebugMagic = "NE1.0.0;"; inline constexpr auto kDebugVersion = 0x0100; inline constexpr auto kDebugDelim = ';'; inline constexpr auto kDebugEnd = '\r'; - - using dk_socket_type = UInt64; } // namespace Detail } // namespace Kernel diff --git a/src/kernel/KernelKit/UserProcessScheduler.h b/src/kernel/KernelKit/UserProcessScheduler.h index 56cd50e7..c8790352 100644 --- a/src/kernel/KernelKit/UserProcessScheduler.h +++ b/src/kernel/KernelKit/UserProcessScheduler.h @@ -34,11 +34,9 @@ class UserProcessHelper; /***********************************************************************************/ class UserProcess NE_VETTABLE { public: - explicit UserProcess(); + UserProcess(); ~UserProcess(); - auto DoVet() const { return *this; } - public: NE_COPY_DEFAULT(UserProcess) diff --git a/src/kernel/NeKit/Json.h b/src/kernel/NeKit/Json.h index c2143651..44db52ba 100644 --- a/src/kernel/NeKit/Json.h +++ b/src/kernel/NeKit/Json.h @@ -24,12 +24,12 @@ namespace Kernel { /// ================================================================================ -/// @brief JSON object representation. +/// @brief JSON Object type. /// ================================================================================ template <typename CharKind = Char> class JsonObject final { public: - explicit JsonObject() : fUndefined(NO) { + JsonObject() : fUndefined(YES) { KBasicString<CharKind> key = KString(kNeJsonMaxLen); key += kNeJsonNullValue; @@ -37,7 +37,7 @@ class JsonObject final { this->AsValue() = key; } - explicit JsonObject(SizeT lhsLen, SizeT rhsLen) : fUndefined(NO), fKey(lhsLen), fValue(rhsLen) { + JsonObject(SizeT lhsLen, SizeT rhsLen) : fUndefined(NO), fKey(lhsLen), fValue(rhsLen) { KBasicString<CharKind> key = KString(lhsLen); this->AsKey() = key; @@ -53,7 +53,7 @@ class JsonObject final { Bool& IsUndefined() { return fUndefined; } private: - Bool fUndefined; // is this instance undefined? + Bool fUndefined{YES}; // is this instance undefined? KBasicString<CharKind> fKey; KBasicString<CharKind> fValue; diff --git a/src/kernel/NeKit/TOML.h b/src/kernel/NeKit/TOML.h index 3eaf5197..9249152b 100644 --- a/src/kernel/NeKit/TOML.h +++ b/src/kernel/NeKit/TOML.h @@ -7,11 +7,20 @@ #pragma once #include <NeKit/Config.h> +#include <NeKit/KString.h> namespace Kernel { +/// \brief TOML Object Handle class TOMLObject final { public: explicit TOMLObject() = delete; ~TOMLObject() = default; + + STATIC TOMLObject kNull; + + private: + Bool fUndefined{YES}; // is this instance undefined? + KString fKey; + KString fValue; }; } // namespace Kernel
\ No newline at end of file |
