summaryrefslogtreecommitdiff
path: root/common_smp/src/tx_thread_smp_utilities.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-10-02 10:42:44 -0400
committerGitHub <[email protected]>2026-10-02 10:42:44 -0400
commit93387b0a60382a29579bbad5045c68328e3751df (patch)
tree42be790d602cb76f55090e5a7c418df7ea2b3428 /common_smp/src/tx_thread_smp_utilities.c
parent44d7c95c582d415c4ad84527180b29c93c3bf664 (diff)
parent28281cd5647d4671236ca08d19bd18ed15b2265a (diff)
Merge pull request #783 from eclipse-threadx/devv6.5.2.202603_rel
Merged changes ahead of the v6.5.2.202603 release
Diffstat (limited to 'common_smp/src/tx_thread_smp_utilities.c')
-rw-r--r--common_smp/src/tx_thread_smp_utilities.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common_smp/src/tx_thread_smp_utilities.c b/common_smp/src/tx_thread_smp_utilities.c
index 833a9aab..0569a819 100644
--- a/common_smp/src/tx_thread_smp_utilities.c
+++ b/common_smp/src/tx_thread_smp_utilities.c
@@ -9,6 +9,7 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
/**************************************************************************/
@@ -654,6 +655,11 @@ TX_THREAD *last_thread;
TX_THREAD *thread_remap_list[TX_THREAD_SMP_MAX_CORES];
+ /* Limit the supplied core maps to the cores that are actually present. */
+ available_cores = available_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK);
+ thread_possible_cores = thread_possible_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK);
+ test_possible_cores = test_possible_cores & ((ULONG) TX_THREAD_SMP_CORE_MASK);
+
/* Clear the last thread cores in the search. */
last_thread_cores = ((ULONG) 0);
@@ -664,6 +670,9 @@ TX_THREAD *thread_remap_list[TX_THREAD_SMP_MAX_CORES];
queue_first = ((UINT) 0);
queue_last = ((UINT) 0);
+ /* Initialize the first core queue entry. */
+ core_queue[0] = ((UINT) 0);
+
/* Build a list of possible cores for this thread to execute on, starting
with the previously mapped core. */
core = schedule_thread -> tx_thread_smp_core_mapped;