wangchdo commented on code in PR #17573:
URL: https://github.com/apache/nuttx/pull/17573#discussion_r2681541402


##########
drivers/timers/arch_alarm.c:
##########
@@ -118,8 +118,9 @@ static void ndelay_accurate(unsigned long nanoseconds)
 static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower,
                              FAR void *arg)
 {
-#ifdef CONFIG_SCHED_TICKLESS
-  nxsched_timer_expiration();
+#if defined(CONFIG_HRTIMER) || defined(CONFIG_SCHED_TICKLESS)
+  nxsched_process_timer();

Review Comment:
   > > @xiaoxiang781216: should we update all driver and remove 
nxsched_timer_expiration
   > 
   > wouldn't that break backward compatibility with existing tickless timer? 
:-P
   
   @cederom
   
   I submitted a separate PR #17823  to do this, and it has been merged, could 
you please check it?



##########
sched/sched/sched_processtimer.c:
##########
@@ -44,11 +44,108 @@
 #include "sched/sched.h"
 #include "wdog/wdog.h"
 #include "clock/clock.h"
+#include "hrtimer/hrtimer.h"
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+#ifdef CONFIG_HRTIMER
+
+/* Scheduler-owned high-resolution timer instance.
+ *
+ * This timer acts as the time source for scheduler-related events:
+ *
+ *  - Periodic scheduler ticks in non-tickless mode
+ *  - Dynamic expiration points in tickless mode
+ *
+ * The timer is initialized lazily to avoid unnecessary setup when
+ * CONFIG_HRTIMER is enabled but not used immediately.
+ */
+
+static hrtimer_t g_nxsched_hrtimer;

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to