diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-03 06:05:26 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-03 06:05:26 +0100 |
| commit | bdfc8770e68da75c20e4127a9dd10f8a7c36810d (patch) | |
| tree | 9c451f9109b9992ef595bd77b63d187ffcb6d86a /dev/Kernel | |
| parent | 6249f2078e0c024dc2cd52436ba11baf6f70bc2a (diff) | |
ADD: Format source code and define __wm_msg struct (public version)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel')
| -rw-r--r-- | dev/Kernel/FSKit/NeFS.h | 8 | ||||
| -rw-r--r-- | dev/Kernel/FirmwareKit/EFI/EFI.h | 28 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalDebugOutput.cc | 2 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/AHCI.cc | 12 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/DMA.cc | 4 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/PIO.cc | 4 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc | 6 | ||||
| -rw-r--r-- | dev/Kernel/KernelKit/HardwareThreadScheduler.h | 2 | ||||
| -rw-r--r-- | dev/Kernel/KernelKit/LoaderInterface.h | 6 | ||||
| -rw-r--r-- | dev/Kernel/KernelKit/PCI/DMA.h | 2 | ||||
| -rw-r--r-- | dev/Kernel/KernelKit/UserProcessScheduler.h | 2 | ||||
| -rw-r--r-- | dev/Kernel/NewKit/Macros.h | 2 | ||||
| -rw-r--r-- | dev/Kernel/StorageKit/AHCI.h | 2 | ||||
| -rw-r--r-- | dev/Kernel/src/FS/NeFS.cc | 8 | ||||
| -rw-r--r-- | dev/Kernel/src/UserProcessScheduler.cc | 2 |
15 files changed, 45 insertions, 45 deletions
diff --git a/dev/Kernel/FSKit/NeFS.h b/dev/Kernel/FSKit/NeFS.h index 0383c234..0c4483e0 100644 --- a/dev/Kernel/FSKit/NeFS.h +++ b/dev/Kernel/FSKit/NeFS.h @@ -281,8 +281,8 @@ namespace NeOS /// @param name the fork name. /// @return the fork. _Output NEFS_FORK_STRUCT* FindFork(_Input NEFS_CATALOG_STRUCT* catalog, - _Input const Char* name, - Boolean data); + _Input const Char* name, + Boolean data); _Output Void RemoveFork(_Input NEFS_FORK_STRUCT* fork); @@ -292,7 +292,7 @@ namespace NeOS _Output NEFS_CATALOG_STRUCT* GetCatalog(_Input const Char* name); - _Output NEFS_CATALOG_STRUCT* CreateCatalog(_Input const Char* name, + _Output NEFS_CATALOG_STRUCT* CreateCatalog(_Input const Char* name, _Input const Int32& flags, _Input const Int32& kind); @@ -307,7 +307,7 @@ namespace NeOS _Output VoidPtr ReadCatalog(_Input _Output NEFS_CATALOG_STRUCT* catalog, _Input Bool isRsrcFork, _Input SizeT dataSz, - _Input const Char* forkName); + _Input const Char* forkName); _Output Bool Seek(_Input _Output NEFS_CATALOG_STRUCT* catalog, SizeT off); diff --git a/dev/Kernel/FirmwareKit/EFI/EFI.h b/dev/Kernel/FirmwareKit/EFI/EFI.h index 0806576d..d6b20d5b 100644 --- a/dev/Kernel/FirmwareKit/EFI/EFI.h +++ b/dev/Kernel/FirmwareKit/EFI/EFI.h @@ -52,7 +52,7 @@ typedef Char16 EfiChar16Type; /// Self is like NT's Win32 HANDLE type. typedef struct EfiHandle { -}* EfiHandlePtr; +} * EfiHandlePtr; /* UEFI uses wide characters by default. */ typedef WideChar EfiCharType; @@ -582,15 +582,15 @@ typedef struct typedef EfiStatusType(EFI_API* EfiInputReadKey)( IN EfiSimpleTextInputProtocol* This, - OUT EfiInputKey* Key); + OUT EfiInputKey* Key); typedef EfiStatusType(EFI_API* EfiInputReset)( IN EfiSimpleTextInputProtocol* This, IN Boolean ExtendedChk); typedef EfiStatusType(EFI_API* EfiWaitForEvent)( - IN UInt32 NumberOfEvents, - IN VoidPtr Event, + IN UInt32 NumberOfEvents, + IN VoidPtr Event, OUT UInt32* Index); typedef struct EfiSimpleTextInputProtocol @@ -646,7 +646,7 @@ typedef struct EfiSystemTable { EfiGUID VendorGUID; VoidPtr VendorTable; - }* ConfigurationTable; + } * ConfigurationTable; } EfiSystemTable; #define kEfiOk 0 @@ -878,11 +878,11 @@ typedef struct _EfiProcessorInformation typedef EfiStatusType EFI_API (*EfiMpServicesGetNumberOfProcessors)( IN struct _EfiMpServicesProtocol* Self, - OUT UInt32* NumberOfProcessors, - OUT UInt32* NumberOfEnabledProcessors); + OUT UInt32* NumberOfProcessors, + OUT UInt32* NumberOfEnabledProcessors); typedef EfiStatusType EFI_API (*EfiMpServicesGetProcessorInfo)( - IN struct _EfiMpServicesProtocol* Self, + IN struct _EfiMpServicesProtocol* Self, IN UInt32* ProcessorNumber, OUT struct _EfiProcessorInformation* NumberOfEnabledProcessors); @@ -895,8 +895,8 @@ typedef EfiStatusType EFI_API (*EfiMpServicesStartupAllAPS)( IN Boolean SingleThread, IN VoidPtr WaitEvent OPTIONAL, // EFI_EVENT first, but unused here. IN UInt32 TimeoutInMicroSeconds, - IN Void* ProcedureArgument OPTIONAL, - OUT UInt32** FailedCpuList OPTIONAL); + IN Void* ProcedureArgument OPTIONAL, + OUT UInt32** FailedCpuList OPTIONAL); typedef EfiStatusType EFI_API (*EfiMpServicesSwitchBSP)( IN struct _EfiMpServicesProtocol* Self, @@ -909,18 +909,18 @@ typedef EfiStatusType EFI_API (*EfiMpServicesStartupThisAP)( IN UInt32 ProcessorNumber, IN VoidPtr WaitEvent OPTIONAL, IN UInt32 TimeoutInMicroseconds, - IN Void* ProcedureArgument OPTIONAL, - OUT Boolean* Finished OPTIONAL); + IN Void* ProcedureArgument OPTIONAL, + OUT Boolean* Finished OPTIONAL); typedef EfiStatusType EFI_API (*EfiMpServicesDisableThisAP)( IN struct _EfiMpServicesProtocol* Self, IN UInt32 ProcessorNumber, IN Boolean EnableAP, - IN UInt32* HealthFlag OPTIONAL); + IN UInt32* HealthFlag OPTIONAL); typedef EfiStatusType EFI_API (*EfiMpServicesWhoAmI)( IN struct _EfiMpServicesProtocol* Self, - OUT UInt32* ProcessorNumber); + OUT UInt32* ProcessorNumber); typedef struct _EfiMpServicesProtocol { diff --git a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc index f41160eb..55b67dea 100644 --- a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc +++ b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc @@ -24,7 +24,7 @@ namespace NeOS namespace Detail { constexpr const UInt16 kPort = 0x3F8; - static UInt16 kState = kStateInvalid; + static UInt16 kState = kStateInvalid; /// @brief Init COM1. /// @return diff --git a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc index a59e50f8..30bd4e78 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc @@ -41,7 +41,7 @@ #define kSATAPortCnt (0x20) -#define kSATASig (0x00000101) +#define kSATASig (0x00000101) #define kSATAPISig (0xEB140101) #define kSATAProgIfAHCI (0x01) @@ -58,9 +58,9 @@ STATIC Int32 drv_find_cmd_slot(HbaPort* port) noexcept; STATIC Void drv_compute_disk_ahci() noexcept; STATIC PCI::Device kPCIDevice; -STATIC HbaMem* kSATA = nullptr; -STATIC SizeT kSATAIndex = 0UL; -STATIC Lba kHighestLBA = 0UL; +STATIC HbaMem* kSATA = nullptr; +STATIC SizeT kSATAIndex = 0UL; +STATIC Lba kHighestLBA = 0UL; STATIC UInt16 kSATAPortsImplemented = 0U; @@ -142,7 +142,7 @@ STATIC Void drv_std_input_output(UInt64 lba, UInt8* buffer, SizeT sector_sz, Siz if (Identify) h2d_fis->Command = kAHCICmdIdentify; - h2d_fis->Lba0 = (lba) & 0xFF; + h2d_fis->Lba0 = (lba)&0xFF; h2d_fis->Lba1 = (lba >> 8) & 0xFF; h2d_fis->Lba2 = (lba >> 16) & 0xFF; @@ -152,7 +152,7 @@ STATIC Void drv_std_input_output(UInt64 lba, UInt8* buffer, SizeT sector_sz, Siz h2d_fis->Lba4 = (lba >> 32) & 0xFF; h2d_fis->Lba5 = (lba >> 40) & 0xFF; - h2d_fis->CountLow = (size_buffer) & 0xFF; + h2d_fis->CountLow = (size_buffer)&0xFF; h2d_fis->CountHigh = (size_buffer >> 8) & 0xFF; while ((kSATA->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq))) diff --git a/dev/Kernel/HALKit/AMD64/Storage/DMA.cc b/dev/Kernel/HALKit/AMD64/Storage/DMA.cc index 2793c1ec..fe5aab84 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/DMA.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/DMA.cc @@ -163,7 +163,7 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz - 1) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); @@ -205,7 +205,7 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz - 1)) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); diff --git a/dev/Kernel/HALKit/AMD64/Storage/PIO.cc b/dev/Kernel/HALKit/AMD64/Storage/PIO.cc index 96232e4b..8a8042cf 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/PIO.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/PIO.cc @@ -125,7 +125,7 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); @@ -152,7 +152,7 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); diff --git a/dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc b/dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc index c9df9b20..e65b016c 100644 --- a/dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc +++ b/dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc @@ -22,9 +22,9 @@ namespace NeOS constexpr auto kFlashBridgeMagic = 0x70768372; constexpr auto kFlashBridgeRevision = 1; - STATIC BOOL kFlashEnabled = NO; - STATIC SizeT kFlashSize[kMaxFlashSlots] = {}; - STATIC SizeT kFlashSectorSz[kMaxFlashSlots] = {}; + STATIC BOOL kFlashEnabled = NO; + STATIC SizeT kFlashSize[kMaxFlashSlots] = {}; + STATIC SizeT kFlashSectorSz[kMaxFlashSlots] = {}; STATIC IMBCIHost* kFlashMetaPackets[kMaxFlashSlots] = {}; STATIC IMBCIHost* kFlashDataPackets[kMaxFlashSlots] = {}; diff --git a/dev/Kernel/KernelKit/HardwareThreadScheduler.h b/dev/Kernel/KernelKit/HardwareThreadScheduler.h index e620d3a4..a0970d24 100644 --- a/dev/Kernel/KernelKit/HardwareThreadScheduler.h +++ b/dev/Kernel/KernelKit/HardwareThreadScheduler.h @@ -105,7 +105,7 @@ namespace NeOS public: Ref<HardwareThread*> operator[](const SizeT& idx); bool operator!() noexcept; - operator bool() noexcept; + operator bool() noexcept; const Bool IsUser() override { diff --git a/dev/Kernel/KernelKit/LoaderInterface.h b/dev/Kernel/KernelKit/LoaderInterface.h index fb17176e..b81dfa16 100644 --- a/dev/Kernel/KernelKit/LoaderInterface.h +++ b/dev/Kernel/KernelKit/LoaderInterface.h @@ -25,9 +25,9 @@ namespace NeOS public: virtual _Output ErrorOr<VoidPtr> GetBlob() = 0; - virtual _Output const Char* AsString() = 0; - virtual _Output const Char* MIME() = 0; - virtual _Output const Char* Path() = 0; + virtual _Output const Char* AsString() = 0; + virtual _Output const Char* MIME() = 0; + virtual _Output const Char* Path() = 0; virtual _Output ErrorOr<VoidPtr> FindStart() = 0; virtual _Output VoidPtr FindSymbol(_Input const Char* name, _Input Int32 kind) = 0; }; diff --git a/dev/Kernel/KernelKit/PCI/DMA.h b/dev/Kernel/KernelKit/PCI/DMA.h index d5a59577..9afa525d 100644 --- a/dev/Kernel/KernelKit/PCI/DMA.h +++ b/dev/Kernel/KernelKit/PCI/DMA.h @@ -52,7 +52,7 @@ namespace NeOS T* Get(const UIntPtr off = 0); public: - operator bool(); + operator bool(); bool operator!(); public: diff --git a/dev/Kernel/KernelKit/UserProcessScheduler.h b/dev/Kernel/KernelKit/UserProcessScheduler.h index 17d992b4..e02ad7de 100644 --- a/dev/Kernel/KernelKit/UserProcessScheduler.h +++ b/dev/Kernel/KernelKit/UserProcessScheduler.h @@ -290,7 +290,7 @@ namespace NeOS NE_COPY_DEFAULT(UserProcessScheduler) - operator bool(); + operator bool(); bool operator!(); public: diff --git a/dev/Kernel/NewKit/Macros.h b/dev/Kernel/NewKit/Macros.h index 56f7ca4d..2cdd97ed 100644 --- a/dev/Kernel/NewKit/Macros.h +++ b/dev/Kernel/NewKit/Macros.h @@ -11,7 +11,7 @@ #endif #ifndef kib_cast -#define kib_cast(X) (NeOS::UInt64)((X) * 1024) +#define kib_cast(X) (NeOS::UInt64)((X)*1024) #endif #ifndef MIB diff --git a/dev/Kernel/StorageKit/AHCI.h b/dev/Kernel/StorageKit/AHCI.h index ce0f91c3..12ca19d9 100644 --- a/dev/Kernel/StorageKit/AHCI.h +++ b/dev/Kernel/StorageKit/AHCI.h @@ -31,7 +31,7 @@ namespace NeOS { return this->fPortsImplemented; } - + Void SetPi(const UInt16& pi) { MUST_PASS(pi > 0); diff --git a/dev/Kernel/src/FS/NeFS.cc b/dev/Kernel/src/FS/NeFS.cc index 75414245..ee8e798a 100644 --- a/dev/Kernel/src/FS/NeFS.cc +++ b/dev/Kernel/src/FS/NeFS.cc @@ -165,8 +165,8 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NEFS_FORK_STRUCT& the_fork) /// @return the fork. /***********************************************************************************/ _Output NEFS_FORK_STRUCT* NeFileSystemParser::FindFork(_Input NEFS_CATALOG_STRUCT* catalog, - _Input const Char* name, - Boolean isDataFork) + _Input const Char* name, + Boolean isDataFork) { auto& drive = kMountpoint.A(); NEFS_FORK_STRUCT* the_fork = nullptr; @@ -231,7 +231,7 @@ _Output NEFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char /// @param kind the catalog kind. /// @return catalog pointer. /***********************************************************************************/ -_Output NEFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char* name, +_Output NEFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char* name, _Input const Int32& flags, _Input const Int32& kind) { @@ -966,7 +966,7 @@ _Output Boolean NeFileSystemParser::RemoveCatalog(_Input const Char* catalog_nam VoidPtr NeFileSystemParser::ReadCatalog(_Input _Output NEFS_CATALOG_STRUCT* catalog, _Input Bool is_rsrc_fork, _Input SizeT dataSz, - _Input const Char* forkName) + _Input const Char* forkName) { if (!catalog) { diff --git a/dev/Kernel/src/UserProcessScheduler.cc b/dev/Kernel/src/UserProcessScheduler.cc index 8cb6d201..4611602a 100644 --- a/dev/Kernel/src/UserProcessScheduler.cc +++ b/dev/Kernel/src/UserProcessScheduler.cc @@ -596,7 +596,7 @@ namespace NeOS return No; UserProcessHelper::TheCurrentPID().Leak().Leak() = new_pid; - + HardwareThreadScheduler::The()[index].Leak()->fPTime = UserProcessScheduler::The().CurrentTeam().AsArray()[new_pid].PTime; HardwareThreadScheduler::The()[index].Leak()->Wake(YES); |
