summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-19 10:24:52 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-19 10:24:52 +0200
commita9653add416fbddc1969a75adb733bc9e9c675d6 (patch)
treec03a8acfd7e1f3e4ffe1407d9acd4e1d52de76b4 /dev/kernel/KernelKit
parentce71265ae5bd333c309dff8c2d46e4d52dd78066 (diff)
feat(kernel, sched): Architectural improvements, and cleaned up
the codebase from previous implementations that didn't work/scale well. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/KernelKit')
-rw-r--r--dev/kernel/KernelKit/MemoryMgr.h5
-rw-r--r--dev/kernel/KernelKit/Timer.h12
2 files changed, 6 insertions, 11 deletions
diff --git a/dev/kernel/KernelKit/MemoryMgr.h b/dev/kernel/KernelKit/MemoryMgr.h
index d84dc9a4..bf389955 100644
--- a/dev/kernel/KernelKit/MemoryMgr.h
+++ b/dev/kernel/KernelKit/MemoryMgr.h
@@ -21,11 +21,6 @@ namespace Kernel {
/// @return a status code regarding the deallocation.
Int32 mm_delete_ptr(VoidPtr heap_ptr);
-/// @brief Declare a new size for heap_ptr.
-/// @param heap_ptr the pointer.
-/// @return unsupported always returns nullptr.
-VoidPtr mm_realloc_ptr(VoidPtr heap_ptr, SizeT new_sz);
-
/// @brief Check if pointer is a valid Kernel pointer.
/// @param heap_ptr the pointer
/// @return if it exists it returns true.
diff --git a/dev/kernel/KernelKit/Timer.h b/dev/kernel/KernelKit/Timer.h
index d6cfee39..2d040535 100644
--- a/dev/kernel/KernelKit/Timer.h
+++ b/dev/kernel/KernelKit/Timer.h
@@ -60,16 +60,16 @@ class HardwareTimer final : public TimerInterface {
Int64 fWaitFor{0};
};
-inline Int64 rtl_microseconds(Int64 time) {
- if (time < 0) return 0;
+inline UInt64 rtl_microseconds(UInt64 time) {
+ if (time < 1) return 0;
// TODO: nanoseconds maybe?
- return kTimeUnit * time;
+ return time / kTimeUnit;
}
-inline Int64 rtl_milliseconds(Int64 time) {
- if (time < 0) return 0;
+inline UInt64 rtl_milliseconds(UInt64 time) {
+ if (time < 1) return 0;
- return kTimeUnit * kTimeUnit * time;
+ return time;
}
} // namespace Kernel