mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
testing/pm_smp: delay_yield ticks 1->2, avoid idle canot run one cycle
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
93a431d19b
commit
e260522fa3
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue