diff options
| author | Tm-C-mT <[email protected]> | 2025-12-02 18:16:14 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-12-10 17:06:41 +0800 |
| commit | d56d3d95d508950b40bb646685ae8f583de1f7e9 (patch) | |
| tree | 96fa9791fa374eb8d288da84d10d134a62001bf7 /src/SConscript | |
| parent | 5f9984fa5ea904ac9ee113d0cf6247b0fe8f614a (diff) | |
[utest]:Modify the execution logic of smp_thread_preemptions
Currently, the print information of this test case fails to demonstrate that
the high-priority thread has preempted the low-priority thread. This is because
when the high-priority thread prints the thread list, there is no information
about the low-priority thread (tlow), as tlow has already completed execution
and been destroyed. Therefore, the current execution logic cannot confirm the
successful completion of the preemption operation.
Solution: After the low-priority thread (tlow) releases the lock, add a busy-wait
loop while(!finish_flag);. At this point, when the high-priority thread (thigh)
prints the thread list information, tlow can be observed in the ready state, indicating
that it has been preempted by thigh.
Signed-off-by: Mengchen Teng <[email protected]>
Diffstat (limited to 'src/SConscript')
0 files changed, 0 insertions, 0 deletions
