diff options
| author | zhujiale <[email protected]> | 2024-09-12 13:12:35 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2024-09-24 09:56:30 +0800 |
| commit | 244cf61af6a0549d2a197af05183a7e902207598 (patch) | |
| tree | c862731a84207dab7e663632efa83b1aa392c96d /examples | |
| parent | 5f83c51347788ab4414cb753485d71c5dc247b6a (diff) | |
SMP
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/utest/testcases/smp/smp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/utest/testcases/smp/smp.c b/examples/utest/testcases/smp/smp.c index 1af161b72f..d5ca161a8a 100644 --- a/examples/utest/testcases/smp/smp.c +++ b/examples/utest/testcases/smp/smp.c @@ -26,10 +26,9 @@ void test1() cpu_mask = rand() % 0xf; if (cpu_mask == 0) pass--; - rt_call_each_cpu(test_call, &cpu_mask, SMP_CALL_NO_WAIT); + rt_call_any_cpu(cpu_mask,test_call, &cpu_mask, SMP_CALL_WAIT_ALL); if (i % 20 == 0) rt_kprintf("#"); - rt_thread_mdelay(1); } rt_kprintf("\n"); uassert_true(pass_count == pass); @@ -57,6 +56,8 @@ void test2(void) static rt_err_t utest_tc_init(void) { + pass_count = 0; + pass = 1000; rt_spin_lock_init(&lock); return RT_EOK; } |
