cleanup code comments and deprecate rt_system_timer_init function.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2045 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2012-04-14 03:51:34 +00:00
parent 00548d27a1
commit 8061067343
2 changed files with 12 additions and 12 deletions

View File

@ -38,11 +38,11 @@ struct rt_thread *rt_current_thread;
rt_uint8_t rt_current_priority;
#if RT_THREAD_PRIORITY_MAX > 32
/* maximun priority level, 256 */
/* Maximum priority level, 256 */
rt_uint32_t rt_thread_ready_priority_group;
rt_uint8_t rt_thread_ready_table[32];
#else
/* maximun priority level, 32 */
/* Maximum priority level, 32 */
rt_uint32_t rt_thread_ready_priority_group;
#endif
@ -140,15 +140,15 @@ void rt_system_scheduler_init(void)
rt_current_priority = RT_THREAD_PRIORITY_MAX - 1;
rt_current_thread = RT_NULL;
/* init ready priority group */
/* initialize ready priority group */
rt_thread_ready_priority_group = 0;
#if RT_THREAD_PRIORITY_MAX > 32
/* init ready table */
/* initialize ready table */
rt_memset(rt_thread_ready_table, 0, sizeof(rt_thread_ready_table));
#endif
/* init thread defunct */
/* initialize thread defunct */
rt_list_init(&rt_thread_defunct);
}

View File

@ -23,7 +23,7 @@
#include <rthw.h>
/* hard timer list */
static rt_list_t rt_timer_list;
static rt_list_t rt_timer_list = RT_LIST_OBJECT_INIT(rt_timer_list);
#ifdef RT_USING_TIMER_SOFT
/* soft timer list */
@ -500,15 +500,12 @@ static void rt_thread_timer_entry(void *parameter)
* @ingroup SystemInit
*
* This function will initialize system timer
*
* @deprecated since 1.1.0, this function does not need to be invoked
* in the system initialization.
*/
void rt_system_timer_init(void)
{
rt_list_init(&rt_timer_list);
#ifdef RT_USING_TIMER_SOFT
rt_list_init(&rt_soft_timer_list);
rt_sem_init(&timer_sem, "timer", 0, RT_IPC_FLAG_FIFO);
#endif
}
/**
@ -519,6 +516,9 @@ void rt_system_timer_init(void)
void rt_system_timer_thread_init(void)
{
#ifdef RT_USING_TIMER_SOFT
rt_list_init(&rt_soft_timer_list);
rt_sem_init(&timer_sem, "timer", 0, RT_IPC_FLAG_FIFO);
/* start software timer thread */
rt_thread_init(&timer_thread,
"timer",