summaryrefslogtreecommitdiff
path: root/common_modules/module_lib
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-09-28 12:44:18 -0400
committerGitHub <[email protected]>2026-09-28 12:44:18 -0400
commitc3bf5e6db5f245e51fae24041d68d061378131b7 (patch)
tree416b34080143d726996598190789ca0c28422933 /common_modules/module_lib
parent2886bdff6fe502a9e1a64d46856a2e9433da33f9 (diff)
Made the SMP pt test's randomised phase set preemption thresholds (#760)
The randomised phase of threadx_smp_random_resume_suspend_exclusion_pt_test guards its preemption-threshold setup with tx_thread_priority > 40, but the test creates its 1024 source threads with priority = i reset whenever it reaches TX_MAX_PRIORITIES, which is 32 on the Linux port the regression suite runs. The guard is therefore never true. The one thing that distinguishes this test from its non-pt twin in that phase never executes, so the randomised phase exercises no preemption threshold at all and the test duplicates its twin there. The threshold the earlier rebalance section sets is unaffected. Both the guard and the threshold gap are now derived from TX_MAX_PRIORITIES, so the phase sets a threshold whatever the port's priority count is. On a 32-priority port that is priority > 16 with a threshold eight levels better, which keeps the original shape of a threshold set on the worse half of the priority range. Verified under gdb that the block is now reached, at priority 26 with a threshold of 18, and that thread_entry's preemption-threshold invariant is entered for a randomised-phase thread; neither happened before the change. 40/40 passes, 20 runs each in disable_notify_callbacks_build and stack_checking_build. Assisted-by: Claude Code (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules/module_lib')
0 files changed, 0 insertions, 0 deletions