This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit df74d0c5b24423ef1fc18c71eb30079744877f72
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Thu Jan 8 15:50:23 2026 +0800

    sched/wdog: Remove wd_restart API.
    
    According to the test results, the restart interface offers no
    performance improvement and requires additional state to encode the
    non-pending state. This commit removed the wd_restart API to simplify
    the wdog module.
    
    Signed-off-by: ouyangxiangzhen <[email protected]>
---
 include/nuttx/wdog.h | 67 ----------------------------------------------------
 1 file changed, 67 deletions(-)

diff --git a/include/nuttx/wdog.h b/include/nuttx/wdog.h
index feaf1d67baf..931745ac2a2 100644
--- a/include/nuttx/wdog.h
+++ b/include/nuttx/wdog.h
@@ -338,73 +338,6 @@ int wd_start_next(FAR struct wdog_s *wdog, clock_t delay,
   return wd_start_abstick(wdog, wdog->expired + delay, wdentry, arg);
 }
 
-/****************************************************************************
- * Name: wd_restart_next
- *
- * Description:
- *   This function restarts the specified watchdog timer using a new delay
- *   value, but schedules the next expiration based on the previous
- *   expiration time (wdog->expired + delay).  This allows the watchdog to
- *   maintain a consistent periodic interval even if there is some delay in
- *   handling the expiration callback.
- *
- *   It can be used when the user wants to restart a watchdog for a different
- *   purpose or continue periodic timing based on the previous timeout point.
- *
- * Input Parameters:
- *   wdog  - Pointer to the watchdog timer to restart
- *   delay - Delay time in system ticks to add after the previous expiration
- *
- * Returned Value:
- *   Zero (OK) is returned on success; a negated errno value is returned
- *   to indicate the nature of any failure.
- *
- * Assumptions:
- *   - The watchdog must already have expired or been started before calling
- *     this function so that wdog->expired is valid.
- *   - The watchdog routine runs in the context of the timer interrupt
- *     handler and is subject to all ISR restrictions.
- *
- ****************************************************************************/
-
-static inline_function
-int wd_restart_next(FAR struct wdog_s *wdog, clock_t delay)
-{
-  return wd_start_next(wdog, delay, wdog->func, wdog->arg);
-}
-
-/****************************************************************************
- * Name: wd_restart
- *
- * Description:
- *   This function restarts the specified watchdog timer using the same
- *   function and argument that were specified in the previous wd_start()
- *   call, but with a new delay value. It can be used when the user wants
- *   to restart the same watchdog with a different timeout value, or to
- *   refresh (feed) an existing watchdog before it expires.
- *
- * Input Parameters:
- *   wdog  - Pointer to the watchdog timer to restart.
- *   delay - New delay time in system ticks before the watchdog expires.
- *
- * Returned Value:
- *   Zero (OK) is returned on success; a negated errno value is returned
- *   to indicate the nature of any failure.
- *
- * Assumptions:
- *   - The watchdog routine runs in the context of the timer interrupt
- *     handler and is subject to all ISR restrictions.
- *   - The watchdog must have been previously started so that the stored
- *     function (wdog->func) and argument (wdog->arg) are valid.
- *
- ****************************************************************************/
-
-static inline_function
-int wd_restart(FAR struct wdog_s *wdog, clock_t delay)
-{
-  return wd_start(wdog, delay, wdog->func, wdog->arg);
-}
-
 /****************************************************************************
  * Name: wd_cancel
  *

Reply via email to