Merge pull request #4745 from mysterywolf/rt-exit
[kernel][thread.c] 规范内部函数命名方式
This commit is contained in:
commit
472be15404
14
src/thread.c
14
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));
|
||||
|
|
Loading…
Reference in New Issue