docs/sched/sched: Add documentation for different sleep interfaces
Build Documentation / build-html (push) Has been cancelled

As pull request apache#17200 & apache#17368 introduced support for scheduling sleep, a documentation is needed for different sleep interfaces.
This patch adds the description for sleep interfaces currently provided in NuttX, including Scheduled sleep(nxsched_sleep()...), Signal-scheduled sleep(nxsig_sleep()...), and Busy sleep(up_udelay()).

Signed-off-by: Haokun Dong <donghaokun@lixiang.com>
This commit is contained in:
donghaokun
2025-12-03 15:22:15 +08:00
committed by simbit18
parent 58be428e37
commit 839468f52d
4 changed files with 124 additions and 4 deletions
+4 -2
View File
@@ -226,14 +226,16 @@ void nxsched_sleep(unsigned int sec)
* Name: nxsched_nanosleep
*
* Description:
* Internal nanosleep implementation used by the scheduler. This function
* Internal nanosleep implementation used by the scheduler. This function
* converts the requested sleep interval into system ticks, performs a
* tick-based blocking sleep, and optionally returns the remaining time if
* the sleep is interrupted by a signal.
*
* Input Parameters:
* rqtp - Requested sleep interval (may be NULL)
* rmtp - Remaining time returned when interrupted (optional, may be NULL)
* rmtp - If the rmtp argument is non-NULL, the timespec structure
* referenced by it is updated to contain the amount of time
* remaining.
*
* Returned Value:
* Returns OK (0) on success. Returns -EINVAL for an invalid timespec