[docs][utest]:Add comments for smp_thread_preemption
Some checks failed
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled

Add comments for smp_thread_preemption.

Signed-off-by: Mengchen Teng <teng_mengchen@163.com>
This commit is contained in:
Tm-C-mT
2025-12-09 21:57:04 +08:00
committed by R b b666
parent d56d3d95d5
commit d9ca9c449b

View File

@@ -18,6 +18,28 @@
* high-priority threads preempt low-priority threads, and
* print the current status of each core in the thread's entry function.
*
* Test Case Name: [smp_thread_preemptions]
*
* Test Objectives:
* - Test the thread preemption logic under the SMP architecture
*
* Test Scenarios:
* - A high-priority thread thigh and a low-priority thread tlow are created. Since tlow is created
* - prior to thigh, it prints the thread list information first and then waits for the finish_flag
* - bit. Once thigh becomes ready, it preempts tlow, prints the thread list, and then sets the
* - finish_flag bit. After that, tlow exits the busy-wait loop.
*
* Verification Metrics:
* - First, the message "Low priority thread is running" will be displayed, followed immediately by
* - a thread_list information list. Subsequently, the message "High priority thread is running" will
* - appear, and in the thread_list that follows, the tlow thread can be observed in the ready state.
*
* Dependencies:
* - Enable RT_USING_SMP, set RT_THREAD_PRIORITY_MAX = 256.
*
* Expected Results:
* - You will see the message "[ PASSED ] [ result ] testcase (core.smp_thread_preemptions)", and observe
* - the tlow thread in the ready state in the thread_list printed by the thigh thread.
*/
#define THREAD_PRIORITY_HIGH 21