From c90179beb535e38b2964daeed084af9969c314c2 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Tue, 13 Aug 2024 19:36:32 -0400 Subject: 删除rt_thread_sleep遗留 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- documentation/thread/thread.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'documentation/thread/thread.md') diff --git a/documentation/thread/thread.md b/documentation/thread/thread.md index ab1058d67c..4c384cd747 100644 --- a/documentation/thread/thread.md +++ b/documentation/thread/thread.md @@ -353,16 +353,15 @@ The `rt_thread_yield()` function is similar to the `rt_schedule()` function, but In practical applications, we sometimes need to delay the current thread running for a period of time and re-run at a specified time. This is called "thread sleep". Thread sleep can use the following three function interfaces: ```c -rt_err_t rt_thread_sleep(rt_tick_t tick); rt_err_t rt_thread_delay(rt_tick_t tick); rt_err_t rt_thread_mdelay(rt_int32_t ms); ``` -These three function interfaces have the same effect. Calling them can cause the current thread to suspend for a specified period of time. After, the thread will wake up and enter the ready state again. This function accepts a parameter that specifies the sleep time of the thread. The parameters and return values of the thread sleep interface rt_thread_sleep/delay/mdelay() are as follows: +These three function interfaces have the same effect. Calling them can cause the current thread to suspend for a specified period of time. After, the thread will wake up and enter the ready state again. This function accepts a parameter that specifies the sleep time of the thread. The parameters and return values of the thread sleep interface rt_thread_delay/mdelay() are as follows: |**Parameters**|Description | | -------- | ------------------------------------------------------------ | -| tick/ms | Thread sleep time:
The input parameter tick of rt_thread_sleep/rt_thread_delay is in units of 1 OS Tick;
The input parameter ms of rt_thread_mdelay is in units of 1ms; | +| tick/ms | Thread sleep time:
The input parameter tick of rt_thread_delay is in units of 1 OS Tick;
The input parameter ms of rt_thread_mdelay is in units of 1ms; | |**Return**| —— | | RT_EOK | Successful operation. | -- cgit v1.3.1