summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-04 09:41:02 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-04 09:41:02 +0100
commit73044afd9c61642b4c8217befa1ded3849685554 (patch)
tree1a7cd9ad6a6f7ab5db46914fb3deaab49f9898a1 /dev/Kernel/src
parentf5b6f148a8c10673e3ef268d3fe76b31902c5930 (diff)
ADD: Important refactors regarding NeKernel.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/src')
-rw-r--r--dev/Kernel/src/ACPIFactoryInterface.cc16
-rw-r--r--dev/Kernel/src/BitMapMgr.cc18
-rw-r--r--dev/Kernel/src/CxxAbi-AMD64.cc4
-rw-r--r--dev/Kernel/src/CxxAbi-ARM64.cc4
-rw-r--r--dev/Kernel/src/DriveMgr.cc10
-rw-r--r--dev/Kernel/src/FS/NeFS+FileMgr.cc4
-rw-r--r--dev/Kernel/src/FS/NeFS.cc84
-rw-r--r--dev/Kernel/src/IndexableProperty.cc2
-rw-r--r--dev/Kernel/src/MemoryMgr.cc8
-rw-r--r--dev/Kernel/src/Network/IPAddr.cc4
-rw-r--r--dev/Kernel/src/PEFCodeMgr.cc4
-rw-r--r--dev/Kernel/src/Pmm.cc4
-rw-r--r--dev/Kernel/src/ThreadLocalStorage.cc8
-rw-r--r--dev/Kernel/src/User.cc12
-rw-r--r--dev/Kernel/src/UserProcessScheduler.cc18
15 files changed, 99 insertions, 101 deletions
diff --git a/dev/Kernel/src/ACPIFactoryInterface.cc b/dev/Kernel/src/ACPIFactoryInterface.cc
index 1565f31d..f5443188 100644
--- a/dev/Kernel/src/ACPIFactoryInterface.cc
+++ b/dev/Kernel/src/ACPIFactoryInterface.cc
@@ -43,10 +43,10 @@ namespace Kernel
this->fEntries = num;
- kcout << "ACPI: Number of entries: " << number(this->fEntries) << endl;
- kcout << "ACPI: Revision: " << number(xsdt->Revision) << endl;
- kcout << "ACPI: Signature: " << xsdt->Signature << endl;
- kcout << "ACPI: Address of XSDT: " << hex_number((UIntPtr)xsdt) << endl;
+ kout << "ACPI: Number of entries: " << number(this->fEntries) << endl;
+ kout << "ACPI: Revision: " << number(xsdt->Revision) << endl;
+ kout << "ACPI: Signature: " << xsdt->Signature << endl;
+ kout << "ACPI: Address of XSDT: " << hex_number((UIntPtr)xsdt) << endl;
const short cAcpiSignatureLength = 4;
@@ -54,8 +54,8 @@ namespace Kernel
{
SDT* sdt = reinterpret_cast<SDT*>(xsdt->AddressArr[index]);
- kcout << "ACPI: Checksum: " << number(sdt->Checksum) << endl;
- kcout << "ACPI: Revision: " << number(sdt->Revision) << endl;
+ kout << "ACPI: Checksum: " << number(sdt->Checksum) << endl;
+ kout << "ACPI: Revision: " << number(sdt->Revision) << endl;
for (short signature_index = 0; signature_index < cAcpiSignatureLength; ++signature_index)
{
@@ -64,8 +64,8 @@ namespace Kernel
if (signature_index == (cAcpiSignatureLength - 1))
{
- kcout << "ACPI: SDT Signature: " << sdt->Signature << endl;
- kcout << "ACPI: SDT OEM ID: " << sdt->OemId << endl;
+ kout << "ACPI: SDT Signature: " << sdt->Signature << endl;
+ kout << "ACPI: SDT OEM ID: " << sdt->OemId << endl;
return ErrorOr<voidPtr>(reinterpret_cast<voidPtr>(xsdt->AddressArr[index]));
}
}
diff --git a/dev/Kernel/src/BitMapMgr.cc b/dev/Kernel/src/BitMapMgr.cc
index 33d6ab34..b255798b 100644
--- a/dev/Kernel/src/BitMapMgr.cc
+++ b/dev/Kernel/src/BitMapMgr.cc
@@ -141,18 +141,18 @@ namespace Kernel
{
if (!this->IsBitMap(ptr_bit_set))
{
- kcout << "Not a BitMap: " << hex_number((UIntPtr)ptr_bit_set) << endl;
+ kout << "Not a BitMap: " << hex_number((UIntPtr)ptr_bit_set) << endl;
return;
}
- kcout << "Magic Number: " << hex_number(ptr_bit_set[kBitMapMagIdx]) << endl;
- kcout << "Is Allocated: " << (ptr_bit_set[kBitMapUsedIdx] ? "Yes" : "No") << endl;
- kcout << "Size of BitMap (B): " << number(ptr_bit_set[kBitMapSizeIdx]) << endl;
- kcout << "Size of BitMap (KIB): " << number(KIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
- kcout << "Size of BitMap (MIB): " << number(MIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
- kcout << "Size of BitMap (GIB): " << number(GIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
- kcout << "Size of BitMap (TIB): " << number(TIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
- kcout << "Address Of BitMap Header: " << hex_number((UIntPtr)ptr_bit_set) << endl;
+ kout << "Magic Number: " << hex_number(ptr_bit_set[kBitMapMagIdx]) << endl;
+ kout << "Is Allocated: " << (ptr_bit_set[kBitMapUsedIdx] ? "Yes" : "No") << endl;
+ kout << "Size of BitMap (B): " << number(ptr_bit_set[kBitMapSizeIdx]) << endl;
+ kout << "Size of BitMap (KIB): " << number(KIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kout << "Size of BitMap (MIB): " << number(MIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kout << "Size of BitMap (GIB): " << number(GIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kout << "Size of BitMap (TIB): " << number(TIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kout << "Address Of BitMap Header: " << hex_number((UIntPtr)ptr_bit_set) << endl;
}
};
} // namespace Detail
diff --git a/dev/Kernel/src/CxxAbi-AMD64.cc b/dev/Kernel/src/CxxAbi-AMD64.cc
index 192a2734..44bda187 100644
--- a/dev/Kernel/src/CxxAbi-AMD64.cc
+++ b/dev/Kernel/src/CxxAbi-AMD64.cc
@@ -19,8 +19,8 @@ Kernel::UIntPtr __dso_handle;
EXTERN_C Kernel::Void __cxa_pure_virtual(void* self)
{
- kcout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self));
- kcout << ", has unimplemented virtual functions.\r";
+ kout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self));
+ kout << ", has unimplemented virtual functions.\r";
}
EXTERN_C void ___chkstk_ms(void)
diff --git a/dev/Kernel/src/CxxAbi-ARM64.cc b/dev/Kernel/src/CxxAbi-ARM64.cc
index 09b2ef65..797cfb9b 100644
--- a/dev/Kernel/src/CxxAbi-ARM64.cc
+++ b/dev/Kernel/src/CxxAbi-ARM64.cc
@@ -83,8 +83,8 @@ namespace cxxabiv1
EXTERN_C Kernel::Void _purecall(void* self)
{
- kcout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self));
- kcout << ", has unimplemented virtual functions.\r";
+ kout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self));
+ kout << ", has unimplemented virtual functions.\r";
}
EXTERN_C Kernel::Void _Init_thread_footer(Kernel::Int* thread_obj)
diff --git a/dev/Kernel/src/DriveMgr.cc b/dev/Kernel/src/DriveMgr.cc
index f2c53a58..7230f112 100644
--- a/dev/Kernel/src/DriveMgr.cc
+++ b/dev/Kernel/src/DriveMgr.cc
@@ -142,7 +142,7 @@ namespace Kernel
trait.fInit = io_drv_unimplemented;
trait.fDriveKind = io_drv_kind;
- kcout << "Construct: " << trait.fName << "\r";
+ kout << "Construct: " << trait.fName << "\r";
return trait;
}
@@ -169,7 +169,7 @@ namespace Kernel
trait.fPacket.fPacketReadOnly = NO;
trait.fKind = kMassStorageDisc | kEPMDrive;
- kcout << "Disk is EPM.\r";
+ kout << "Disk is EPM.\r";
trait.fSectorSz = block_struct.SectorSz;
trait.fLbaEnd = block_struct.LbaEnd;
@@ -187,12 +187,12 @@ namespace Kernel
trait.fPacket.fPacketReadOnly = YES;
trait.fKind = kMassStorageDisc | kUnformattedDrive | kReadOnlyDrive;
- kcout << "Scheme Found: " << block_struct.Name << endl;
+ kout << "Scheme Found: " << block_struct.Name << endl;
if (block_struct.Name[0] == 0 ||
block_struct.Name[0] == 0xFF ||
block_struct.Name[0] == 0xAF)
- kcout << "Disk partition is empty (Read Only)\r";
+ kout << "Disk partition is empty (Read Only)\r";
}
rt_copy_memory((VoidPtr) "*/*", trait.fPacket.fPacketMime,
@@ -222,7 +222,7 @@ namespace Kernel
trait.fInit = io_drv_init;
trait.fDriveKind = io_drv_kind;
- kcout << "Detecting partition scheme of: " << trait.fName << ".\r";
+ kout << "Detecting partition scheme of: " << trait.fName << ".\r";
Detect::io_detect_drive(trait);
diff --git a/dev/Kernel/src/FS/NeFS+FileMgr.cc b/dev/Kernel/src/FS/NeFS+FileMgr.cc
index 17a77905..1aa92f71 100644
--- a/dev/Kernel/src/FS/NeFS+FileMgr.cc
+++ b/dev/Kernel/src/FS/NeFS+FileMgr.cc
@@ -21,14 +21,14 @@ namespace Kernel
NeFileSystemParser* mParser = new NeFileSystemParser();
MUST_PASS(mParser);
- kcout << "We are done allocating NeFileSystemParser...\r";
+ kout << "We are done allocating NeFileSystemParser...\r";
}
NeFileSystemMgr::~NeFileSystemMgr()
{
if (mParser)
{
- kcout << "Destroying NeFileSystemParser...\r";
+ kout << "Destroying NeFileSystemParser...\r";
mm_delete_class(&mParser);
}
}
diff --git a/dev/Kernel/src/FS/NeFS.cc b/dev/Kernel/src/FS/NeFS.cc
index 507f3e63..d954230d 100644
--- a/dev/Kernel/src/FS/NeFS.cc
+++ b/dev/Kernel/src/FS/NeFS.cc
@@ -74,7 +74,7 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NFS_FORK_STRUCT& the_fork)
Lba lba = catalog->DataFork;
- kcout << "Fork LBA: " << hex_number(lba) << endl;
+ kout << "Fork LBA: " << hex_number(lba) << endl;
if (lba < kNeFSCatalogStartAddress)
return NO;
@@ -95,18 +95,18 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NFS_FORK_STRUCT& the_fork)
drv.fInput(drv.fPacket);
- kcout << "Next fork: " << hex_number(cur_fork.NextSibling) << endl;
+ kout << "Next fork: " << hex_number(cur_fork.NextSibling) << endl;
if (cur_fork.Flags & kNeFSFlagCreated)
{
- kcout << "Error: Fork does exists.\r";
+ kout << "Error: Fork does exists.\r";
/// sanity check.
if (StringBuilder::Equals(cur_fork.ForkName, the_fork.ForkName) &&
StringBuilder::Equals(cur_fork.CatalogName, the_fork.CatalogName))
break;
- kcout << "Next fork: " << hex_number(cur_fork.NextSibling) << endl;
+ kout << "Next fork: " << hex_number(cur_fork.NextSibling) << endl;
lba_prev = lba;
lba = cur_fork.NextSibling;
@@ -142,17 +142,17 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NFS_FORK_STRUCT& the_fork)
drv.fPacket.fPacketSize = sizeof(NFS_FORK_STRUCT);
drv.fPacket.fPacketContent = &the_fork;
- kcout << "Writing fork metadata...\r";
+ kout << "Writing fork metadata...\r";
// drv.fOutput(drv.fPacket);
fs_ifs_write(&kMountpoint, drv, MountpointInterface::kDriveIndexA);
/// log what we have now.
- kcout << "Fork offset is at: " << hex_number(the_fork.DataOffset)
+ kout << "Fork offset is at: " << hex_number(the_fork.DataOffset)
<< endl;
- kcout << "Wrote fork metadata at: " << hex_number(lba) << endl;
+ kout << "Wrote fork metadata at: " << hex_number(lba) << endl;
return YES;
}
@@ -237,11 +237,11 @@ _Output NFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char*
_Input const Int32& flags,
_Input const Int32& kind)
{
- kcout << "CreateCatalog(...)\r";
+ kout << "CreateCatalog(...)\r";
Lba out_lba = 0UL;
- kcout << "Checking for path separator...\r";
+ kout << "Checking for path separator...\r";
/// a directory should have a slash in the end.
if (kind == kNeFSCatalogKindDir &&
@@ -257,7 +257,7 @@ _Output NFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char*
if (catalog_copy)
{
- kcout << "Catalog already exists: " << name << ".\r";
+ kout << "Catalog already exists: " << name << ".\r";
err_global_get() = kErrorFileExists;
delete catalog_copy;
@@ -275,7 +275,7 @@ _Output NFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char*
if (*parent_name == 0)
{
- kcout << "Parent name is NUL.\r";
+ kout << "Parent name is NUL.\r";
err_global_get() = kErrorFileNotFound;
return nullptr;
}
@@ -309,7 +309,7 @@ _Output NFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char*
if (catalog && catalog->Kind == kNeFSCatalogKindFile)
{
- kcout << "Parent is a file.\r";
+ kout << "Parent is a file.\r";
delete catalog;
return nullptr;
@@ -412,9 +412,9 @@ _Output NFS_CATALOG_STRUCT* NeFileSystemParser::CreateCatalog(_Input const Char*
drive.fOutput(drive.fPacket);
- kcout << "Create new catalog with flags: "
+ kout << "Create new catalog with flags: "
<< hex_number(child_catalog->Flags) << endl;
- kcout << "Create new catalog with name: " << child_catalog->Name
+ kout << "Create new catalog with name: " << child_catalog->Name
<< endl;
delete catalog;
@@ -583,14 +583,14 @@ bool NeFileSystemParser::Format(_Input _Output DriveTrait* drive, _Input const L
drive->fOutput(&drive->fPacket);
- kcout << "drive kind: " << drive->fDriveKind() << endl;
+ kout << "drive kind: " << drive->fDriveKind() << endl;
- kcout << "partition name: " << part_block->PartitionName << endl;
- kcout << "start: " << hex_number(part_block->StartCatalog) << endl;
- kcout << "number of catalogs: " << hex_number(part_block->CatalogCount) << endl;
- kcout << "free catalog: " << hex_number(part_block->FreeCatalog) << endl;
- kcout << "free sectors: " << hex_number(part_block->FreeSectors) << endl;
- kcout << "sector size: " << hex_number(part_block->SectorSize) << endl;
+ kout << "partition name: " << part_block->PartitionName << endl;
+ kout << "start: " << hex_number(part_block->StartCatalog) << endl;
+ kout << "number of catalogs: " << hex_number(part_block->CatalogCount) << endl;
+ kout << "free catalog: " << hex_number(part_block->FreeCatalog) << endl;
+ kout << "free sectors: " << hex_number(part_block->FreeSectors) << endl;
+ kout << "sector size: " << hex_number(part_block->SectorSize) << endl;
// write the root catalog.
this->CreateCatalog(kNeFSRoot, 0, kNeFSCatalogKindDir);
@@ -598,7 +598,7 @@ bool NeFileSystemParser::Format(_Input _Output DriveTrait* drive, _Input const L
return true;
}
- kcout << "partition block already exists.\r";
+ kout << "partition block already exists.\r";
start += part_block->DiskSize;
@@ -650,7 +650,7 @@ bool NeFileSystemParser::WriteCatalog(_Input const Char* catalog_name, Bool is_r
NFS_FORK_STRUCT* fork_data_input = new NFS_FORK_STRUCT();
NFS_FORK_STRUCT prev_fork{};
- kcout << hex_number(startFork) << endl;
+ kout << hex_number(startFork) << endl;
// sanity check of the fork position as the condition to run the loop.
while (startFork >= kNeFSCatalogStartAddress)
@@ -661,13 +661,13 @@ bool NeFileSystemParser::WriteCatalog(_Input const Char* catalog_name, Bool is_r
drive.fInput(drive.fPacket);
- kcout << hex_number(fork_data_input->DataSize) << endl;
- kcout << hex_number(size_of_data) << endl;
- kcout << hex_number(fork_data_input->Flags) << endl;
- kcout << fork_name << endl;
- kcout << fork_data_input->ForkName << endl;
- kcout << fork_data_input->CatalogName << endl;
- kcout << catalog_name << endl;
+ kout << hex_number(fork_data_input->DataSize) << endl;
+ kout << hex_number(size_of_data) << endl;
+ kout << hex_number(fork_data_input->Flags) << endl;
+ kout << fork_name << endl;
+ kout << fork_data_input->ForkName << endl;
+ kout << fork_data_input->CatalogName << endl;
+ kout << catalog_name << endl;
if ((fork_data_input->Flags & kNeFSFlagCreated) &&
StringBuilder::Equals(fork_data_input->ForkName, fork_name) &&
@@ -682,14 +682,14 @@ bool NeFileSystemParser::WriteCatalog(_Input const Char* catalog_name, Bool is_r
drive.fPacket.fPacketSize = size_of_data;
drive.fPacket.fPacketLba = fork_data_input->DataOffset;
- kcout << "data offset: " << hex_number(fork_data_input->DataOffset) << endl;
+ kout << "data offset: " << hex_number(fork_data_input->DataOffset) << endl;
drive.fOutput(drive.fPacket);
- kcout << "wrote data at offset: " << hex_number(fork_data_input->DataOffset) << endl;
+ kout << "wrote data at offset: " << hex_number(fork_data_input->DataOffset) << endl;
delete fork_data_input;
- delete buf;
+ delete[] buf;
return true;
}
@@ -701,7 +701,7 @@ bool NeFileSystemParser::WriteCatalog(_Input const Char* catalog_name, Bool is_r
startFork = fork_data_input->NextSibling;
}
- delete buf;
+ delete[] buf;
delete fork_data_input;
return false;
@@ -795,8 +795,6 @@ kNeFSSearchThroughCatalogList:
drive.fInput(drive.fPacket);
- kcout << temporary_catalog.Name << endl;
-
if (StringBuilder::Equals(catalog_name, temporary_catalog.Name))
{
if (temporary_catalog.Status == kNeFSStatusLocked &&
@@ -815,8 +813,8 @@ kNeFSSearchThroughCatalogList:
goto NeFSContinueSearch;
}
- kcout << "Found available catalog at: " << hex_number(start_catalog_lba) << endl;
- kcout << "Found available catalog at: " << temporary_catalog.Name << endl;
+ kout << "Found available catalog at: " << hex_number(start_catalog_lba) << endl;
+ kout << "Found available catalog at: " << temporary_catalog.Name << endl;
NFS_CATALOG_STRUCT* catalog_ptr = new NFS_CATALOG_STRUCT();
rt_copy_memory(&temporary_catalog, catalog_ptr, sizeof(NFS_CATALOG_STRUCT));
@@ -953,7 +951,7 @@ VoidPtr NeFileSystemParser::ReadCatalog(_Input _Output NFS_CATALOG_STRUCT* catal
Lba dataForkLba = (!is_rsrc_fork) ? catalog->DataFork : catalog->ResourceFork;
Size dataForkSize = (!is_rsrc_fork) ? catalog->DataForkSize : catalog->ResourceForkSize;
- kcout << "catalog " << catalog->Name
+ kout << "catalog " << catalog->Name
<< ", fork: " << hex_number(dataForkLba) << endl;
NFS_FORK_STRUCT* fs_buf = new NFS_FORK_STRUCT();
@@ -974,8 +972,8 @@ VoidPtr NeFileSystemParser::ReadCatalog(_Input _Output NFS_CATALOG_STRUCT* catal
fs_fork_data = fs_buf;
- kcout << "ForkName: " << fs_fork_data->ForkName << endl;
- kcout << "CatalogName: " << fs_fork_data->CatalogName << endl;
+ kout << "ForkName: " << fs_fork_data->ForkName << endl;
+ kout << "CatalogName: " << fs_fork_data->CatalogName << endl;
if (StringBuilder::Equals(forkName, fs_fork_data->ForkName) &&
StringBuilder::Equals(catalog->Name, fs_fork_data->CatalogName))
@@ -1037,11 +1035,11 @@ namespace Kernel::NeFS
/***********************************************************************************/
Boolean fs_init_nefs(Void) noexcept
{
- kcout << "Creating A:\r";
+ kout << "Creating A:\r";
kMountpoint.A() = io_construct_main_drive();
- kcout << "Creating A: [ OK ]\r";
+ kout << "Creating A: [ OK ]\r";
return true;
}
diff --git a/dev/Kernel/src/IndexableProperty.cc b/dev/Kernel/src/IndexableProperty.cc
index a37d22fe..c27e6124 100644
--- a/dev/Kernel/src/IndexableProperty.cc
+++ b/dev/Kernel/src/IndexableProperty.cc
@@ -50,7 +50,7 @@ namespace Kernel
indexer.AddFlag(kIndexerClaimed);
rt_copy_memory((VoidPtr)indexer.Leak().Path, (VoidPtr)filename, filenameLen);
- kcout << "FSKit: Indexed new file: " << filename << endl;
+ kout << "FSKit: Indexed new file: " << filename << endl;
}
}
} // namespace Indexer
diff --git a/dev/Kernel/src/MemoryMgr.cc b/dev/Kernel/src/MemoryMgr.cc
index 3627a478..bdaec674 100644
--- a/dev/Kernel/src/MemoryMgr.cc
+++ b/dev/Kernel/src/MemoryMgr.cc
@@ -104,7 +104,7 @@ namespace Kernel
if (!ptr_heap || new_sz < 1)
return nullptr;
- kcout << "This function is not implemented by NeOSKrnl, please use the BSD's realloc instead.\r";
+ kout << "This function is not implemented by NeOSKrnl, please use the BSD's realloc instead.\r";
ke_panic(RUNTIME_CHECK_INVALID);
return nullptr;
@@ -144,7 +144,7 @@ namespace Kernel
auto result = reinterpret_cast<VoidPtr>(heap_info_ptr->fOffset);
- kcout << "Registered heap address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
+ kout << "Registered heap address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
return result;
}
@@ -166,7 +166,7 @@ namespace Kernel
heap_info_ptr->fPage = true;
- kcout << "Registered page address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
+ kout << "Registered page address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
return kErrorSuccess;
}
@@ -238,7 +238,7 @@ namespace Kernel
PageMgr heap_mgr;
heap_mgr.Free(pte_address);
- kcout << "Address has been successfully freed." << endl;
+ kout << "Address has been successfully freed." << endl;
return kErrorSuccess;
}
diff --git a/dev/Kernel/src/Network/IPAddr.cc b/dev/Kernel/src/Network/IPAddr.cc
index abcd39d8..090854bd 100644
--- a/dev/Kernel/src/Network/IPAddr.cc
+++ b/dev/Kernel/src/Network/IPAddr.cc
@@ -43,7 +43,7 @@ namespace Kernel
char& RawIPAddress::operator[](const Size& index)
{
- kcout << "[RawIPAddress::operator[]] Fetching Index...\r";
+ kout << "[RawIPAddress::operator[]] Fetching Index...\r";
static char IP_PLACEHOLDER = '0';
if (index > 4)
@@ -59,7 +59,7 @@ namespace Kernel
char& RawIPAddress6::operator[](const Size& index)
{
- kcout << "[RawIPAddress6::operator[]] Fetching Index...\r";
+ kout << "[RawIPAddress6::operator[]] Fetching Index...\r";
static char IP_PLACEHOLDER = '0';
if (index > 8)
diff --git a/dev/Kernel/src/PEFCodeMgr.cc b/dev/Kernel/src/PEFCodeMgr.cc
index 2756b2a4..53f83291 100644
--- a/dev/Kernel/src/PEFCodeMgr.cc
+++ b/dev/Kernel/src/PEFCodeMgr.cc
@@ -95,7 +95,7 @@ namespace Kernel
if (fCachedBlob)
mm_delete_heap(fCachedBlob);
- kcout << "PEFLoader: warn: Executable format error!\r";
+ kout << "PEFLoader: warn: Executable format error!\r";
fCachedBlob = nullptr;
}
@@ -184,7 +184,7 @@ namespace Kernel
rt_copy_memory((VoidPtr)((Char*)blob + sizeof(PEFCommandHeader)), container_blob_value, container_header->Size);
mm_delete_heap(blob);
- kcout << "PEFLoader: INFO: Load stub: " << container_header->Name << "!\r";
+ kout << "PEFLoader: INFO: Load stub: " << container_header->Name << "!\r";
return container_blob_value;
}
diff --git a/dev/Kernel/src/Pmm.cc b/dev/Kernel/src/Pmm.cc
index c2627eb5..08c700f3 100644
--- a/dev/Kernel/src/Pmm.cc
+++ b/dev/Kernel/src/Pmm.cc
@@ -23,7 +23,7 @@ namespace Kernel
Pmm::Pmm()
: fPageMgr()
{
- kcout << "[PMM] Allocate PageMemoryMgr";
+ kout << "[PMM] Allocate PageMemoryMgr";
}
Pmm::~Pmm() = default;
@@ -39,7 +39,7 @@ namespace Kernel
if (pt.fPresent)
{
- kcout << "[PMM]: Allocation failed.\r";
+ kout << "[PMM]: Allocation failed.\r";
return {};
}
diff --git a/dev/Kernel/src/ThreadLocalStorage.cc b/dev/Kernel/src/ThreadLocalStorage.cc
index 16aab967..6b62c316 100644
--- a/dev/Kernel/src/ThreadLocalStorage.cc
+++ b/dev/Kernel/src/ThreadLocalStorage.cc
@@ -35,7 +35,7 @@ Boolean tls_check_tib(THREAD_INFORMATION_BLOCK* tib_ptr)
ICodec encoder;
const Char* tib_as_bytes = encoder.AsBytes(tib_ptr);
- kcout << "TLS: Validating the TIB...\r";
+ kout << "TLS: Validating the TIB...\r";
return tib_as_bytes[kCookieMag0Idx] == kCookieMag0 && tib_as_bytes[kCookieMag1Idx] == kCookieMag1 &&
tib_as_bytes[kCookieMag2Idx] == kCookieMag2;
@@ -50,7 +50,7 @@ EXTERN_C Bool tls_check_syscall_impl(Kernel::VoidPtr tib_ptr) noexcept
{
if (!tib_ptr)
{
- kcout << "TLS: Failing because of an invalid TIB...\r";
+ kout << "TLS: Failing because of an invalid TIB...\r";
return false;
}
@@ -58,10 +58,10 @@ EXTERN_C Bool tls_check_syscall_impl(Kernel::VoidPtr tib_ptr) noexcept
if (!tls_check_tib(tib))
{
- kcout << "TLS: Failing because of an invalid TIB...\r";
+ kout << "TLS: Failing because of an invalid TIB...\r";
return false;
}
- kcout << "TLS Passed checked.\r";
+ kout << "TLS Passed checked.\r";
return true;
}
diff --git a/dev/Kernel/src/User.cc b/dev/Kernel/src/User.cc
index 1559c23e..f42ca69a 100644
--- a/dev/Kernel/src/User.cc
+++ b/dev/Kernel/src/User.cc
@@ -36,7 +36,7 @@ namespace Kernel
if (!password || !user)
return 1;
- kcout << "cred_construct_token: Hashing user password...\r";
+ kout << "cred_construct_token: Hashing user password...\r";
for (SizeT i_pass = 0UL; i_pass < length; ++i_pass)
{
@@ -48,7 +48,7 @@ namespace Kernel
password[i_pass] = cur_chr | (user->IsStdUser() ? kStdUserType : kSuperUserType);
}
- kcout << "cred_construct_token: Hashed user password.\r";
+ kout << "cred_construct_token: Hashed user password.\r";
return 0;
}
@@ -109,7 +109,7 @@ namespace Kernel
delete[] password;
password = nullptr;
- kcout << "User::Save: Saved password successfully...\r";
+ kout << "User::Save: Saved password successfully...\r";
return Yes;
}
@@ -138,16 +138,16 @@ namespace Kernel
return No;
}
- kcout << "User::Matches: Validating hashed passwords...\r";
+ kout << "User::Matches: Validating hashed passwords...\r";
// now check if the password matches.
if (rt_string_cmp(password, this->mUserKey, rt_string_len(this->mUserKey)) == 0)
{
- kcout << "User::Matches: Password matches.\r";
+ kout << "User::Matches: Password matches.\r";
return Yes;
}
- kcout << "User::Matches: Password doesn't match.\r";
+ kout << "User::Matches: Password doesn't match.\r";
return No;
}
diff --git a/dev/Kernel/src/UserProcessScheduler.cc b/dev/Kernel/src/UserProcessScheduler.cc
index 7758dbb2..a3955c2c 100644
--- a/dev/Kernel/src/UserProcessScheduler.cc
+++ b/dev/Kernel/src/UserProcessScheduler.cc
@@ -57,7 +57,7 @@ namespace Kernel
if (this->Status != ProcessStatusKind::kRunning)
return;
- kcout << this->Name << ": crashed, error id: " << number(kErrorProcessFault) << endl;
+ kout << this->Name << ": crashed, error id: " << number(kErrorProcessFault) << endl;
this->Exit(kErrorProcessFault);
}
@@ -338,7 +338,7 @@ namespace Kernel
MUST_PASS(process.DylibDelegate);
}
default: {
- kcout << "Unknown process kind: " << hex_number(process.Kind) << endl;
+ kout << "Unknown process kind: " << hex_number(process.Kind) << endl;
break;
}
}
@@ -365,8 +365,8 @@ namespace Kernel
process.Status = ProcessStatusKind::kStarting;
process.PTime = (UIntPtr)AffinityKind::kStandard;
- kcout << "PID: " << number(process.ProcessId) << endl;
- kcout << "Name: " << process.Name << endl;
+ kout << "PID: " << number(process.ProcessId) << endl;
+ kout << "Name: " << process.Name << endl;
return pid;
}
@@ -433,11 +433,11 @@ namespace Kernel
if (mTeam.mProcessCount < 1)
{
- kcout << "UserProcessScheduler::Run(): This team doesn't have any process!\r";
+ kout << "UserProcessScheduler::Run(): This team doesn't have any process!\r";
return 0UL;
}
- kcout << "UserProcessScheduler::Run(): This team has a process capacity of: " << hex_number(mTeam.mProcessList.Capacity()) << endl;
+ kout << "UserProcessScheduler::Run(): This team has a process capacity of: " << hex_number(mTeam.mProcessList.Capacity()) << endl;
for (; process_index < mTeam.AsArray().Capacity(); ++process_index)
{
@@ -451,7 +451,7 @@ namespace Kernel
process.PTime = static_cast<Int32>(process.Affinity);
- kcout << "Switch to: '" << process.Name << "'.\r";
+ kout << "Switch to: '" << process.Name << "'.\r";
// tell helper to find a core to schedule on.
BOOL ret = UserProcessHelper::Switch(process.Image.fCode, &process.StackReserve[process.StackSize - 1], process.StackFrame,
@@ -462,7 +462,7 @@ namespace Kernel
if (process.Affinity == AffinityKind::kRealTime)
continue;
- kcout << "The process: " << process.Name << ", is not valid! Crashing it...\r";
+ kout << "The process: " << process.Name << ", is not valid! Crashing it...\r";
process.Crash();
}
@@ -499,7 +499,7 @@ namespace Kernel
if (!kProcessScheduler.CurrentProcess())
return ErrorOr<PID>{kErrorProcessFault};
- kcout << "UserProcessHelper::TheCurrentPID: Leaking ProcessId...\r";
+ kout << "UserProcessHelper::TheCurrentPID: Leaking ProcessId...\r";
return ErrorOr<PID>{kProcessScheduler.CurrentProcess().Leak().ProcessId};
}