xiaoxiang781216 commented on code in PR #18224:
URL: https://github.com/apache/nuttx/pull/18224#discussion_r2735853109
##########
include/nuttx/hrtimer.h:
##########
@@ -207,9 +207,19 @@ int hrtimer_cancel_sync(FAR hrtimer_t *hrtimer);
* OK on success; a negated errno value on failure.
****************************************************************************/
+int hrtimer_start_async(FAR hrtimer_t *hrtimer, hrtimer_entry_t func,
Review Comment:
hrtimer_start already cover the functionality provided by
hrtimer_start_async, why add a new function?
##########
sched/wdog/wdog.h:
##########
@@ -111,12 +155,16 @@ static inline_function clock_t
wd_adjust_next_tick(clock_t tick)
return next_tick;
}
-static inline_function void wd_timer_start(clock_t tick)
+static inline_function void wd_timer_start(clock_t tick, bool in_expiration)
{
clock_t next_tick = wd_adjust_next_tick(tick);
-
#ifdef CONFIG_HRTIMER
- nxsched_hrtimer_tick_start(tick);
+ DEBUGASSERT(next_tick <= CLOCK_MAX / NSEC_PER_SEC);
+ if (!in_expiration)
+ {
+ hrtimer_start(&g_wdog_hrtimer, wd_timer, next_tick * NSEC_PER_TICK,
Review Comment:
next_tick * NSEC_PER_TICK to TICK2NSEC
--
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]