Merge pull request #4745 from mysterywolf/rt-exit

[kernel][thread.c] 规范内部函数命名方式
This commit is contained in:
Bernard Xiong 2021-06-01 11:05:49 +08:00 committed by GitHub
commit 472be15404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -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));