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

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

commit 19eac98526beb7a76152564fe848c4a003dd70da
Author: ouyangxiangzhen <ouyangxiangz...@xiaomi.com>
AuthorDate: Mon Jun 9 21:04:56 2025 +0800

    sched: Add comments for wd_start_next and work_queue_next.
    
    This commit added comments for newly added APIs wd_start_next and
    work_queue_next.
    
    Signed-off-by: ouyangxiangzhen <ouyangxiangz...@xiaomi.com>
---
 include/nuttx/wdog.h   | 6 +++++-
 include/nuttx/wqueue.h | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/nuttx/wdog.h b/include/nuttx/wdog.h
index 10c8945238..016aacee4b 100644
--- a/include/nuttx/wdog.h
+++ b/include/nuttx/wdog.h
@@ -294,7 +294,11 @@ int wd_start_realtime(FAR struct wdog_s *wdog,
  *
  * Description:
  *   This function restart watchdog timer based on the last expiration time.
- *   It can be used to implement a periodic watchdog timer.
+ *   It can be used to implement a periodic watchdog timer. E.g, Call this
+ *   function instead of wd_start in the watchdog callback to restart the
+ *   next timer for better timing accuracy.
+ *   Note that calling this function outside the watchdog callback requires
+ *   the wdog->expired being set.
  *
  * Input Parameters:
  *   wdog     - Pointer of the periodic watchdog.
diff --git a/include/nuttx/wqueue.h b/include/nuttx/wqueue.h
index f9b3470efe..73e8a0eb1e 100644
--- a/include/nuttx/wqueue.h
+++ b/include/nuttx/wqueue.h
@@ -414,7 +414,11 @@ int work_queue_wq(FAR struct kwork_wqueue_s *wqueue,
  *
  * Description:
  *   Queue work to be performed at a later time based on the last expiration
- *   time. This function must be called in the workqueue callback.
+ *   time. This function can be used to implement a periodic workqueue.
+ *   E.g, Call this function instead of work_queue in the work callback to
+ *   restart the next work for better timing accuracy.
+ *   Note that calling this function outside the work callback requires
+ *   the work->qtime being set.
  *
  * Input Parameters:
  *   qid    - The work queue ID (must be HPWORK or LPWORK)

Reply via email to