summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-27 19:38:51 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-27 19:42:30 +0100
commitc6c908167e37e0f82e272f6f9fd6462c0dd4502c (patch)
treecb5b6337cc413da9c95e9aa0406ed023b6ce9614 /Private/Source
parent2f7c48ef9172ba48fa177600a12ab0d51cb9e566 (diff)
Kernel: Last refactor of the kernel.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/CodeManager.cxx4
-rw-r--r--Private/Source/PermissionSelector.cxx2
-rw-r--r--Private/Source/Timer.cxx7
3 files changed, 7 insertions, 6 deletions
diff --git a/Private/Source/CodeManager.cxx b/Private/Source/CodeManager.cxx
index ba117346..1928683b 100644
--- a/Private/Source/CodeManager.cxx
+++ b/Private/Source/CodeManager.cxx
@@ -115,14 +115,14 @@ namespace hCore
if (auto sym = this->FindSymbol("__start", kPefCode); sym)
return ErrorOr<VoidPtr>(sym);
- return ErrorOr<VoidPtr>(ME_EXEC_ERROR);
+ return ErrorOr<VoidPtr>(H_EXEC_ERROR);
}
bool PEFLoader::IsLoaded() noexcept { return !fBad && fCachedBlob; }
namespace Utils
{
- bool execute_from_image(PEFLoader& exec)
+ bool execute_from_image(PEFLoader& exec) noexcept
{
auto errOrStart = exec.LoadStart();
diff --git a/Private/Source/PermissionSelector.cxx b/Private/Source/PermissionSelector.cxx
index 22d7f5e7..a14f146d 100644
--- a/Private/Source/PermissionSelector.cxx
+++ b/Private/Source/PermissionSelector.cxx
@@ -30,4 +30,4 @@ namespace hCore
bool PermissionSelector::operator!=(const PermissionSelector& lhs) { return lhs.fRing != this->fRing; }
const RingKind& PermissionSelector::Ring() noexcept { return this->fRing; }
-}
+} // namespace hCore
diff --git a/Private/Source/Timer.cxx b/Private/Source/Timer.cxx
index 9b8c5448..73343fad 100644
--- a/Private/Source/Timer.cxx
+++ b/Private/Source/Timer.cxx
@@ -13,16 +13,17 @@
using namespace hCore;
+Int32 HardwareTimerInterface::Wait() noexcept { return H_UNIMPLEMENTED; }
+
HardwareTimer::HardwareTimer(Int64 seconds) : fWaitFor(seconds) {}
HardwareTimer::~HardwareTimer() { fWaitFor = 0; }
-Int32 HardwareTimer::Wait()
+Int32 HardwareTimer::Wait() noexcept
{
if (fWaitFor < 1)
return -1;
- while (*fDigitalTimer < (*fDigitalTimer + fWaitFor))
- ;
+ while (*fDigitalTimer < (*fDigitalTimer + fWaitFor)) {}
return 0;
} \ No newline at end of file