This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit e260522fa384ffc7da914e819239559f57124c69 Author: buxiasen <[email protected]> AuthorDate: Mon Aug 19 18:13:54 2024 +0800 testing/pm_smp: delay_yield ticks 1->2, avoid idle canot run one cycle Signed-off-by: buxiasen <[email protected]> --- testing/drivertest/drivertest_pm_smp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testing/drivertest/drivertest_pm_smp.c b/testing/drivertest/drivertest_pm_smp.c index 02aeee818..6f9f967d7 100644 --- a/testing/drivertest/drivertest_pm_smp.c +++ b/testing/drivertest/drivertest_pm_smp.c @@ -176,14 +176,16 @@ static void test_pm_callback_notify(FAR struct pm_callback_s *cb, static void test_pm_smp_yield(void) { - usleep(USEC_PER_TICK); + /* two ticks to avoid very quick jump out and idle cannot run one cycle */ + + usleep(USEC_PER_TICK * 2); } #endif static void test_pm_smp_naps(void) { int r = random() % (TEST_SNAP_TICK_MAX * USEC_PER_TICK); - usleep(r + USEC_PER_TICK); + usleep(r + USEC_PER_TICK * 2); } static void *test_pm_smp_thread_entry(void *arg)
