summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2024-02-19 01:35:50 -0500
committerMeco Man <[email protected]>2024-02-19 01:56:21 -0500
commit2748a6ada432152887ed2cad059e43e2a130793c (patch)
tree6679e6465f607f72f6519824f13a1bbc8c87c5fb /src/thread.c
parent4cbc1a41f6458c58611aa96b893fbac597cb3384 (diff)
[kernel] fix some strict compiling warnings
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/thread.c b/src/thread.c
index a2bc74bf6d..f7d99c859b 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -30,7 +30,7 @@
* 2021-11-15 THEWON Remove duplicate work between idle and _thread_exit
* 2021-12-27 Meco Man remove .init_priority
* 2022-01-07 Gabriel Moving __on_rt_xxxxx_hook to thread.c
- * 2022-01-24 THEWON let rt_thread_sleep return thread->error when using signal
+ * 2022-01-24 THEWON let _thread_sleep return thread->error when using signal
* 2022-10-15 Bernard add nested mutex feature
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable
* 2023-12-10 xqyjlj fix thread_exit/detach/delete
@@ -164,6 +164,8 @@ static rt_err_t _thread_init(struct rt_thread *thread,
rt_uint8_t priority,
rt_uint32_t tick)
{
+ RT_UNUSED(name);
+
/* init thread list */
rt_list_init(&(thread->tlist));
rt_list_init(&(thread->tlist_schedule));
@@ -622,7 +624,7 @@ RTM_EXPORT(rt_thread_yield);
* @return Return the operation status. If the return value is RT_EOK, the function is successfully executed.
* If the return value is any other values, it means this operation failed.
*/
-rt_err_t rt_thread_sleep(rt_tick_t tick)
+static rt_err_t _thread_sleep(rt_tick_t tick)
{
rt_base_t level;
struct rt_thread *thread;
@@ -686,7 +688,7 @@ rt_err_t rt_thread_sleep(rt_tick_t tick)
*/
rt_err_t rt_thread_delay(rt_tick_t tick)
{
- return rt_thread_sleep(tick);
+ return _thread_sleep(tick);
}
RTM_EXPORT(rt_thread_delay);
@@ -773,7 +775,7 @@ rt_err_t rt_thread_mdelay(rt_int32_t ms)
tick = rt_tick_from_millisecond(ms);
- return rt_thread_sleep(tick);
+ return _thread_sleep(tick);
}
RTM_EXPORT(rt_thread_mdelay);