This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 9b8aa6399c6edf23891842dc6e52fefed0dd88f8 Author: ouyangxiangzhen <[email protected]> AuthorDate: Thu Mar 5 17:45:19 2026 +0800 ostest/hrtimer: Decrease the hrtimer period to avoid starvation. This commit decreased the hrtimer period to avoid starvation. If CPU resources are insufficient, the hrtimer will keep triggering, leading to starvation. Assisted-By: mimo-v2.6-pro Signed-off-by: ouyangxiangzhen <[email protected]> --- testing/ostest/hrtimer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/ostest/hrtimer.c b/testing/ostest/hrtimer.c index df172e847..742796827 100644 --- a/testing/ostest/hrtimer.c +++ b/testing/ostest/hrtimer.c @@ -656,7 +656,7 @@ static uint64_t hrtimer_test_callback_critdelay(FAR const hrtimer_t *timer, /* Return reschedule interval for periodic behavior */ - return 300 * NSEC_PER_USEC; + return 10000 * NSEC_PER_USEC; } /**************************************************************************** @@ -734,7 +734,7 @@ static void hrtimer_test_cancel_periodic(FAR hrtimer_test_t *param) spin_unlock_irqrestore(lock, flags); - up_ndelay(10000); + hrtimer_test_ndelay(10000); flags = spin_lock_irqsave(lock); @@ -745,7 +745,7 @@ static void hrtimer_test_cancel_periodic(FAR hrtimer_test_t *param) hrtimer_cancel(¶m->timer); - up_ndelay(10000); + hrtimer_test_ndelay(10000); /* The hrtimer should not restart after cancellation */
