diff options
Diffstat (limited to 'Kernel/Sources')
| -rw-r--r-- | Kernel/Sources/CxxAbi-ARM64.cxx | 56 | ||||
| -rw-r--r-- | Kernel/Sources/FS/NewFS.cxx | 4 | ||||
| -rw-r--r-- | Kernel/Sources/Framebuffer.cxx | 23 | ||||
| -rw-r--r-- | Kernel/Sources/Json.cxx | 2 | ||||
| -rw-r--r-- | Kernel/Sources/KernelHeap.cxx | 4 | ||||
| -rw-r--r-- | Kernel/Sources/ProcessScheduler.cxx | 4 | ||||
| -rw-r--r-- | Kernel/Sources/Storage/NVMEDeviceInterface.cxx | 6 | ||||
| -rw-r--r-- | Kernel/Sources/URL.cxx | 4 |
8 files changed, 50 insertions, 53 deletions
diff --git a/Kernel/Sources/CxxAbi-ARM64.cxx b/Kernel/Sources/CxxAbi-ARM64.cxx index 4602be7a..46524374 100644 --- a/Kernel/Sources/CxxAbi-ARM64.cxx +++ b/Kernel/Sources/CxxAbi-ARM64.cxx @@ -10,62 +10,60 @@ #include <NewKit/CxxAbi.hpp> #include <KernelKit/HError.hpp> - EXTERN_C { #include <limits.h> } -int const cUninitialized = 0; +int const cUninitialized = 0; int const cBeingInitialized = -1; -int const cEpochStart = INT_MIN; +int const cEpochStart = INT_MIN; EXTERN_C { - int _Init_global_epoch = cEpochStart; - __thread int _Init_thread_epoch = cEpochStart; + int _Init_global_epoch = cEpochStart; + __thread int _Init_thread_epoch = cEpochStart; } Kernel::UInt32 const cNKTimeout = 100; // ms EXTERN_C void __cdecl _Init_thread_wait(Kernel::UInt32 const timeout) { - MUST_PASS(timeout != INT_MAX); + MUST_PASS(timeout != INT_MAX); } EXTERN_C void __cdecl _Init_thread_header(int* const pOnce) noexcept { - if (*pOnce == cUninitialized) - { - *pOnce = cBeingInitialized; - } - else - { - while (*pOnce == cBeingInitialized) - { - _Init_thread_wait(cNKTimeout); - - if (*pOnce == cUninitialized) - { - *pOnce = cBeingInitialized; - return; - } - } - _Init_thread_epoch = _Init_global_epoch; - } - + if (*pOnce == cUninitialized) + { + *pOnce = cBeingInitialized; + } + else + { + while (*pOnce == cBeingInitialized) + { + _Init_thread_wait(cNKTimeout); + + if (*pOnce == cUninitialized) + { + *pOnce = cBeingInitialized; + return; + } + } + _Init_thread_epoch = _Init_global_epoch; + } } EXTERN_C void __cdecl _Init_thread_abort(int* const pOnce) noexcept { - *pOnce = cUninitialized; + *pOnce = cUninitialized; } EXTERN_C void __cdecl _Init_thread_footer(int* const pOnce) noexcept { - ++_Init_global_epoch; - *pOnce = _Init_global_epoch; - _Init_thread_epoch = _Init_global_epoch; + ++_Init_global_epoch; + *pOnce = _Init_global_epoch; + _Init_thread_epoch = _Init_global_epoch; } EXTERN_C void _purecall() diff --git a/Kernel/Sources/FS/NewFS.cxx b/Kernel/Sources/FS/NewFS.cxx index 45cdc766..5a8ff1a2 100644 --- a/Kernel/Sources/FS/NewFS.cxx +++ b/Kernel/Sources/FS/NewFS.cxx @@ -38,7 +38,7 @@ STATIC MountpointInterface sMountpointInterface; /// @param theFork the fork itself. /// @return the fork _Output NewFork* NewFSParser::CreateFork(_Input NewCatalog* catalog, - _Input NewFork& theFork) + _Input NewFork& theFork) { if (!sMountpointInterface.GetAddressOf(this->fDriveIndex)) return nullptr; @@ -207,7 +207,7 @@ _Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name) /// @param flags the flags of the catalog. /// @param kind the catalog kind. /// @return catalog pointer. -_Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name, +_Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name, _Input const Int32& flags, _Input const Int32& kind) { diff --git a/Kernel/Sources/Framebuffer.cxx b/Kernel/Sources/Framebuffer.cxx index c9c44a55..f006a9b9 100644 --- a/Kernel/Sources/Framebuffer.cxx +++ b/Kernel/Sources/Framebuffer.cxx @@ -70,14 +70,13 @@ namespace Kernel } /// @brief Draws a rectangle. - /// @param width - /// @param height - /// @param x - /// @param y - /// @param color - /// @return - _Output Framebuffer& Framebuffer::DrawRect(SizeT width, SizeT height, - SizeT x, SizeT y, UInt32 color) + /// @param width + /// @param height + /// @param x + /// @param y + /// @param color + /// @return + _Output Framebuffer& Framebuffer::DrawRect(SizeT width, SizeT height, SizeT x, SizeT y, UInt32 color) { for (Kernel::SizeT i = x; i < width + x; ++i) { @@ -93,10 +92,10 @@ namespace Kernel } /// @brief Put a pixel on the screen. - /// @param x - /// @param y - /// @param color - /// @return + /// @param x + /// @param y + /// @param color + /// @return _Output Framebuffer& Framebuffer::PutPixel(SizeT x, SizeT y, UInt32 color) { *(((volatile Kernel::UInt32*)(fFrameBufferAddr.Leak()->fBase + diff --git a/Kernel/Sources/Json.cxx b/Kernel/Sources/Json.cxx index 510ebd77..6ecd8e47 100644 --- a/Kernel/Sources/Json.cxx +++ b/Kernel/Sources/Json.cxx @@ -9,4 +9,4 @@ using namespace Kernel; /// @brief Undefined object, is null in length. -INIT(Kernel::JsonType::kUndefined, Kernel::JsonType); +cInitObject(Kernel::JsonType::kUndefined, Kernel::JsonType); diff --git a/Kernel/Sources/KernelHeap.cxx b/Kernel/Sources/KernelHeap.cxx index 8c550b61..510584dd 100644 --- a/Kernel/Sources/KernelHeap.cxx +++ b/Kernel/Sources/KernelHeap.cxx @@ -63,7 +63,7 @@ namespace Kernel if (heapInfoBlk->fCRC32 > 0) { - MUST_PASS(ke_protect_ke_heap(allocatedPtr)); + MUST_PASS(ke_protect_ke_heap(allocatedPtr)); } return allocatedPtr; @@ -76,7 +76,7 @@ namespace Kernel /// @return the pointer VoidPtr ke_new_ke_heap(const SizeT sz, const bool rw, const bool user) { - auto szFix = sz; + auto szFix = sz; if (szFix == 0) ++szFix; diff --git a/Kernel/Sources/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx index 85aa7f76..42e7285a 100644 --- a/Kernel/Sources/ProcessScheduler.cxx +++ b/Kernel/Sources/ProcessScheduler.cxx @@ -219,7 +219,7 @@ namespace Kernel } else { - // something went wrong, do not continue, process kind is incorrect. + // something went wrong, do not continue, process kind is incorrect. process.Leak().Crash(); return -kErrorProcessFault; } @@ -245,7 +245,7 @@ namespace Kernel /// @retval false process doesn't exist in team. Bool ProcessScheduler::Remove(SizeT processSlot) { - // check if process is within range. + // check if process is within range. if (processSlot > mTeam.AsArray().Count()) return false; diff --git a/Kernel/Sources/Storage/NVMEDeviceInterface.cxx b/Kernel/Sources/Storage/NVMEDeviceInterface.cxx index c5d47725..e1d4ed30 100644 --- a/Kernel/Sources/Storage/NVMEDeviceInterface.cxx +++ b/Kernel/Sources/Storage/NVMEDeviceInterface.cxx @@ -8,9 +8,9 @@ namespace Kernel { - NVMEDeviceInterface::NVMEDeviceInterface(void (*Out)(MountpointInterface* outpacket), - void (*In)(MountpointInterface* inpacket), - void (*Cleanup)(void)) + NVMEDeviceInterface::NVMEDeviceInterface(void (*Out)(MountpointInterface* outpacket), + void (*In)(MountpointInterface* inpacket), + void (*Cleanup)(void)) : DeviceInterface(Out, In), fCleanup(Cleanup) { } diff --git a/Kernel/Sources/URL.cxx b/Kernel/Sources/URL.cxx index 104d5f36..88328ea6 100644 --- a/Kernel/Sources/URL.cxx +++ b/Kernel/Sources/URL.cxx @@ -21,8 +21,8 @@ namespace Kernel /// @brief internal and reserved protocols by kernel. constexpr const Char* kURLProtocols[] = { - "file", // Filesystem protocol - "zup", // Zeta update protocol + "file", // Filesystem protocol + "zup", // Zeta update protocol "oscc", // Open System Configuration Connectivity. }; |
