mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
docs/sched/sched: Add documentation for different sleep interfaces
Build Documentation / build-html (push) Has been cancelled
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user