summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/src/HardwareThreadScheduler.cc
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/src/HardwareThreadScheduler.cc
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/src/HardwareThreadScheduler.cc')
-rw-r--r--dev/kernel/src/HardwareThreadScheduler.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/dev/kernel/src/HardwareThreadScheduler.cc b/dev/kernel/src/HardwareThreadScheduler.cc
index 09c1c7d8..b801632c 100644
--- a/dev/kernel/src/HardwareThreadScheduler.cc
+++ b/dev/kernel/src/HardwareThreadScheduler.cc
@@ -57,19 +57,6 @@ ThreadKind& HardwareThread::Kind() noexcept {
//! @return whether the thread is busy or not.
/***********************************************************************************/
Bool HardwareThread::IsBusy() noexcept {
- STATIC Int64 busy_timer = 0U;
- constexpr Int64 kTimeoutMax =
- 0x1000000; // an arbitrary value used to tell if the timeout hasn't been reached yet.
-
- if (fBusy && (busy_timer > kTimeoutMax)) {
- busy_timer = 0U;
- fBusy = No;
-
- return No;
- }
-
- ++busy_timer;
-
return fBusy;
}
@@ -105,8 +92,6 @@ Void HardwareThread::Wake(const bool wakeup) noexcept {
/// @retval false stack is invalid, previous code is running.
/***********************************************************************************/
Bool HardwareThread::Switch(HAL::StackFramePtr frame) {
- if (this->IsBusy()) return NO;
-
this->fStack = frame;
Bool ret = mp_register_process(fStack, this->fPID);