diff options
Diffstat (limited to 'cpukit/rtems')
-rw-r--r-- | cpukit/rtems/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/timerimpl.h | 23 | ||||
-rw-r--r-- | cpukit/rtems/src/rtemstimer.c | 22 | ||||
-rw-r--r-- | cpukit/rtems/src/rtemstimerdata.c | 23 |
4 files changed, 14 insertions, 55 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index d0f3907d4d..83ee630c60 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -171,7 +171,6 @@ librtems_a_SOURCES += src/timerreset.c librtems_a_SOURCES += src/timerserver.c librtems_a_SOURCES += src/timerserverfireafter.c librtems_a_SOURCES += src/timerserverfirewhen.c -librtems_a_SOURCES += src/rtemstimerdata.c ## MESSAGE_QUEUE_C_FILES librtems_a_SOURCES += src/msg.c diff --git a/cpukit/rtems/include/rtems/rtems/timerimpl.h b/cpukit/rtems/include/rtems/rtems/timerimpl.h index e5b37aa5f1..55be6343c3 100644 --- a/cpukit/rtems/include/rtems/rtems/timerimpl.h +++ b/cpukit/rtems/include/rtems/rtems/timerimpl.h @@ -35,18 +35,6 @@ extern "C" { * @{ */ -/** - * @brief Instantiate RTEMS Timer Data - * - * This constant is defined to extern most of the time when using - * this header file. However by defining it to nothing, the data - * declared in this header file can be instantiated. This is done - * in a single per manager file. - */ -#ifndef RTEMS_TIMER_EXTERN -#define RTEMS_TIMER_EXTERN extern -#endif - typedef struct Timer_server_Control Timer_server_Control; /** @@ -128,20 +116,13 @@ struct Timer_server_Control { * * This value is @c NULL when the default timer server is not initialized. */ -RTEMS_TIMER_EXTERN Timer_server_Control *volatile _Timer_server; +extern Timer_server_Control *volatile _Timer_server; /** * The following defines the information control block used to manage * this class of objects. */ -RTEMS_TIMER_EXTERN Objects_Information _Timer_Information; - -/** - * @brief Timer Manager Initialization - * - * This routine performs the initialization necessary for this manager. - */ -void _Timer_Manager_initialization(void); +extern Objects_Information _Timer_Information; /** * @brief Timer_Allocate diff --git a/cpukit/rtems/src/rtemstimer.c b/cpukit/rtems/src/rtemstimer.c index 259a81c2fb..f591c25af2 100644 --- a/cpukit/rtems/src/rtemstimer.c +++ b/cpukit/rtems/src/rtemstimer.c @@ -20,13 +20,16 @@ #include <rtems/system.h> #include <rtems/config.h> +#include <rtems/sysinit.h> #include <rtems/rtems/status.h> #include <rtems/rtems/support.h> -#include <rtems/score/thread.h> #include <rtems/rtems/timerimpl.h> -#include <rtems/score/watchdog.h> -void _Timer_Manager_initialization(void) +Timer_server_Control *volatile _Timer_server; + +Objects_Information _Timer_Information; + +static void _Timer_Manager_initialization(void) { _Objects_Initialize_information( &_Timer_Information, /* object information table */ @@ -43,11 +46,10 @@ void _Timer_Manager_initialization(void) NULL /* Proxy extraction support callout */ #endif ); - - /* - * Initialize the pointer to the default timer server control block to NULL - * indicating that task-based timer support is not initialized. - */ - - _Timer_server = NULL; } + +RTEMS_SYSINIT_ITEM( + _Timer_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_TIMER, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/rtemstimerdata.c b/cpukit/rtems/src/rtemstimerdata.c deleted file mode 100644 index 522e9cb0bf..0000000000 --- a/cpukit/rtems/src/rtemstimerdata.c +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @file - * - * @brief Instantiate RTEMS Timer Data - * @ingroup ClassicTimer - */ - -/* - * COPYRIGHT (c) 1989-2007. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#define RTEMS_TIMER_EXTERN - -#include <rtems/rtems/timerimpl.h> |