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 387803e958c05083a02d31ffaf5ef9ac3870a541 Author: wangchengdong <[email protected]> AuthorDate: Mon Nov 10 09:29:38 2025 +0800 Documentation: Add wd_restart() API description Add documentation for the newly introduced wd_restart() API, describing its purpose and usage. Signed-off-by: Chengdong Wang <[email protected]> --- Documentation/reference/os/time_clock.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/reference/os/time_clock.rst b/Documentation/reference/os/time_clock.rst index c9b53defad5..be51c3cef27 100644 --- a/Documentation/reference/os/time_clock.rst +++ b/Documentation/reference/os/time_clock.rst @@ -260,7 +260,7 @@ Tickless Configuration Options simulated platform: .. code-block:: console - + config ARCH_SIM bool "Simulation" select ARCH_HAVE_TICKLESS @@ -490,6 +490,7 @@ use ``mq_send()``, ``sigqueue()``, or ``kill()`` to communicate with NuttX tasks. - :c:func:`wd_start` +- :c:func:`wd_restart` - :c:func:`wd_cancel` - :c:func:`wd_gettime` - Watchdog Timer Callback @@ -538,6 +539,22 @@ with NuttX tasks. to wdentry; VxWorks supports only a single parameter. The maximum number of parameters is determined by +.. c:function:: int wd_restart(FAR struct wdog_s *wdog, clock_t delay) + + 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. + + :param wdog: Pointer to the watchdog timer to restart + :param delay: Delay count in clock ticks + + **NOTE**: The parameter must be of type ``wdparm_t``. + + :return: Zero (``OK``) is returned on success; a negated ``errno`` value + is return to indicate the nature of any failure. + .. c:function:: int wd_cancel(FAR struct wdog_s *wdog) This function cancels a currently running
