diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 14:52:35 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:52 +0100 |
commit | 26335844f484c8cd061444cebba9480b62d165cb (patch) | |
tree | ccfc446db291d329a723c6f1eb22e570216bc63b /cpukit | |
parent | Optional Classic Tasks initialization (diff) | |
download | rtems-26335844f484c8cd061444cebba9480b62d165cb.tar.bz2 |
Optional Classic Timer initialization
Update #2408.
Diffstat (limited to 'cpukit')
-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 | ||||
-rw-r--r-- | cpukit/sapi/src/rtemsapi.c | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/sysinit.h | 1 |
6 files changed, 15 insertions, 57 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> diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c index 251d77204a..422cf6cc22 100644 --- a/cpukit/sapi/src/rtemsapi.c +++ b/cpukit/sapi/src/rtemsapi.c @@ -36,11 +36,9 @@ #include <rtems/rtems/regionimpl.h> #include <rtems/rtems/semimpl.h> #include <rtems/rtems/signalimpl.h> -#include <rtems/rtems/timerimpl.h> void _RTEMS_API_Initialize(void) { - _Timer_Manager_initialization(); _Signal_Manager_initialization(); _Event_Manager_initialization(); _Message_queue_Manager_initialization(); diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h index bac6663952..cd604877a8 100644 --- a/cpukit/score/include/rtems/sysinit.h +++ b/cpukit/score/include/rtems/sysinit.h @@ -32,6 +32,7 @@ extern "C" { #define RTEMS_SYSINIT_DATA_STRUCTURES 000301 #define RTEMS_SYSINIT_USER_EXTENSIONS 000320 #define RTEMS_SYSINIT_CLASSIC_TASKS 000340 +#define RTEMS_SYSINIT_CLASSIC_TIMER 000341 #define RTEMS_SYSINIT_IDLE_THREADS 000380 #define RTEMS_SYSINIT_BSP_LIBC 000400 #define RTEMS_SYSINIT_BEFORE_DRIVERS 000500 |