summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-05-29 17:30:18 +0800
committerMeco Man <[email protected]>2021-05-29 17:30:18 +0800
commit039d7979d83666e96d7f6efb84255de0047e3e67 (patch)
tree45404ff5e233a4d098c54da9bdefdd6be426cd4c /src/thread.c
parent06927af8f1955778b8f3d5f6afc09e01de4e17c1 (diff)
[kernel][thread.c] 规范内部函数命名方式
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/thread.c b/src/thread.c
index e03c027eff..6304a4ebe6 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -79,7 +79,7 @@ void rt_thread_inited_sethook(void (*hook)(rt_thread_t thread))
#endif
/* must be invoke witch rt_hw_interrupt_disable */
-static void _thread_cleanup_execute(rt_thread_t thread)
+static void _rt_thread_cleanup_execute(rt_thread_t thread)
{
register rt_base_t level;
#ifdef RT_USING_MODULE
@@ -103,7 +103,7 @@ static void _thread_cleanup_execute(rt_thread_t thread)
rt_hw_interrupt_enable(level);
}
-void rt_thread_exit(void)
+static void _rt_thread_exit(void)
{
struct rt_thread *thread;
register rt_base_t level;
@@ -114,7 +114,7 @@ void rt_thread_exit(void)
/* disable interrupt */
level = rt_hw_interrupt_disable();
- _thread_cleanup_execute(thread);
+ _rt_thread_cleanup_execute(thread);
/* remove from schedule */
rt_schedule_remove_thread(thread);
@@ -165,11 +165,11 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread,
#ifdef ARCH_CPU_STACK_GROWS_UPWARD
thread->sp = (void *)rt_hw_stack_init(thread->entry, thread->parameter,
(void *)((char *)thread->stack_addr),
- (void *)rt_thread_exit);
+ (void *)_rt_thread_exit);
#else
thread->sp = (void *)rt_hw_stack_init(thread->entry, thread->parameter,
(rt_uint8_t *)((char *)thread->stack_addr + thread->stack_size - sizeof(rt_ubase_t)),
- (void *)rt_thread_exit);
+ (void *)_rt_thread_exit);
#endif
/* priority init */
@@ -374,7 +374,7 @@ rt_err_t rt_thread_detach(rt_thread_t thread)
rt_schedule_remove_thread(thread);
}
- _thread_cleanup_execute(thread);
+ _rt_thread_cleanup_execute(thread);
/* release thread timer */
rt_timer_detach(&(thread->thread_timer));
@@ -472,7 +472,7 @@ rt_err_t rt_thread_delete(rt_thread_t thread)
rt_schedule_remove_thread(thread);
}
- _thread_cleanup_execute(thread);
+ _rt_thread_cleanup_execute(thread);
/* release thread timer */
rt_timer_detach(&(thread->thread_timer));