From 443c4c46b02b4df0a32135be7d471554dcb29b1e Mon Sep 17 00:00:00 2001 From: zhangyuan21 Date: Tue, 14 Mar 2023 19:18:24 +0800 Subject: [PATCH] arch_timer: fixed build issue when enable tickless Signed-off-by: zhangyuan21 --- drivers/timers/arch_timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/timers/arch_timer.c b/drivers/timers/arch_timer.c index 4caa2f27a6..df954eaf46 100644 --- a/drivers/timers/arch_timer.c +++ b/drivers/timers/arch_timer.c @@ -206,7 +206,7 @@ void up_timer_set_lowerhalf(FAR struct timer_lowerhalf_s *lower) g_timer.lower = lower; #ifdef CONFIG_SCHED_TICKLESS - g_oneshot_maxticks = TIMER_TICK_MAXTIMEOUT(lower); + TIMER_TICK_MAXTIMEOUT(lower, &g_oneshot_maxticks); TIMER_TICK_SETTIMEOUT(g_timer.lower, g_oneshot_maxticks); #else TIMER_TICK_SETTIMEOUT(g_timer.lower, 1); @@ -252,7 +252,9 @@ void up_timer_set_lowerhalf(FAR struct timer_lowerhalf_s *lower) #ifdef CONFIG_CLOCK_TIMEKEEPING void weak_function up_timer_getmask(FAR clock_t *mask) { - uint32_t maxticks = TIMER_TICK_MAXTIMEOUT(g_timer.lower); + uint32_t maxticks; + + TIMER_TICK_MAXTIMEOUT(g_timer.lower, &maxticks); *mask = 0; while (1)