diff options
Diffstat (limited to 'dev/ZKA/Sources/HardwareThreadScheduler.cxx')
| -rw-r--r-- | dev/ZKA/Sources/HardwareThreadScheduler.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/dev/ZKA/Sources/HardwareThreadScheduler.cxx b/dev/ZKA/Sources/HardwareThreadScheduler.cxx index e5947357..22a69b9b 100644 --- a/dev/ZKA/Sources/HardwareThreadScheduler.cxx +++ b/dev/ZKA/Sources/HardwareThreadScheduler.cxx @@ -43,6 +43,14 @@ namespace Kernel //! @brief is the thread busy? Bool HardwareThread::IsBusy() noexcept { + STATIC Int64 busy_timer = 0U; + + if (busy_timer > this->fPTime) + { + busy_timer = 0U; + fBusy = No; + } + return fBusy; } @@ -95,16 +103,17 @@ namespace Kernel if (!this->IsWakeup()) return No; - fStack = frame; - if (this->IsBusy()) - return false; + return No; - kcout << "Registering process bank...\r"; + fStack = frame; + + kcout << "Trying to register progress...\r"; - this->Busy(true); Bool ret = mp_register_process(image, stack_ptr, fStack); - this->Busy(false); + + if (ret) + this->Busy(true); return ret; } |
