summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc')
-rw-r--r--dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc
index 2ce05e7c..1d298698 100644
--- a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc
+++ b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc
@@ -101,8 +101,9 @@ Void hal_send_ipi_msg(UInt32 target, UInt32 apic_id, UInt8 vector) {
/// @param thrdid The thread ID.
/***********************************************************************************/
-EXTERN_C HAL::StackFramePtr mp_get_current_context(Int64 thrdid) {
- const auto process_index = thrdid % kSchedProcessLimitPerTeam;
+EXTERN_C HAL::StackFramePtr mp_get_current_task(Int64 thrdid) {
+ const auto process_index = thrdid;
+ if (thrdid > kSMPCount) return nullptr;
return kHWThread[process_index].mFramePtr;
}