From a9653add416fbddc1969a75adb733bc9e9c675d6 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 19 May 2025 10:24:52 +0200 Subject: 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 --- dev/kernel/src/HardwareThreadScheduler.cc | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'dev/kernel/src/HardwareThreadScheduler.cc') 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); -- cgit v1.2.3