diff options
| author | [email protected] <[email protected]> | 2012-04-14 03:51:34 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-04-14 03:51:34 +0000 |
| commit | 8061067343e2eda986616bb68aa52fe7fded5456 (patch) | |
| tree | 1443f1d67b6294088ffc6fabeea3851f56c12f61 /src/timer.c | |
| parent | 00548d27a1f53fb363fbcea7fc05d7a27622ac9c (diff) | |
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
Diffstat (limited to 'src/timer.c')
| -rw-r--r-- | src/timer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/timer.c b/src/timer.c index 03babc49fe..ce3df9bc1a 100644 --- a/src/timer.c +++ b/src/timer.c @@ -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", |
