diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-22 20:34:49 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-22 20:34:49 +0100 |
| commit | ae0ac26290af91ddc3b15f83cab43944b067eb29 (patch) | |
| tree | 5d0146a9658e1764db36fba7e9ea455a33d25c35 /dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc | |
| parent | eba5dbf36b5c96ce8d3e2c46cf9d798c3fb7ec89 (diff) | |
kernel(tweak): Tweak scheduler interrupt handler
to avoid repeating myself in the code.
Diffstat (limited to 'dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc index 05326ecb..9eaa24eb 100644 --- a/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc +++ b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc @@ -58,10 +58,15 @@ EXTERN_C void idt_handle_pf(NeOS::UIntPtr rsp) process.Leak().Crash(); } +namespace NeOS::Detail +{ + constexpr static Int32 kTimeoutCount = 100000UL; +} + /// @brief Handle scheduler interrupt. EXTERN_C void idt_handle_scheduler(NeOS::UIntPtr rsp) { - static NeOS::Int64 try_count_before_brute = 100000UL; + static NeOS::Int64 try_count_before_brute = NeOS::Detail::kTimeoutCount; while (kIsScheduling) { @@ -71,7 +76,7 @@ EXTERN_C void idt_handle_scheduler(NeOS::UIntPtr rsp) break; } - try_count_before_brute = 100000UL; + try_count_before_brute = NeOS::Detail::kTimeoutCount; kIsScheduling = YES; NeOS::UserProcessHelper::StartScheduling(); |
