diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 15:15:22 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:53 +0100 |
commit | b377e3f6b70b5a5a09ac1dd77a450e4e5812cc42 (patch) | |
tree | d486652a680b9f6ed33dbc8fca44de8cd14dfea0 /cpukit | |
parent | Optional Classic Dual-Ported Memory initialization (diff) | |
download | rtems-b377e3f6b70b5a5a09ac1dd77a450e4e5812cc42.tar.bz2 |
Optional Classic Rate Monotonic initialization
Update #2408.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/rtems/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/ratemonimpl.h | 21 | ||||
-rw-r--r-- | cpukit/rtems/src/ratemon.c | 13 | ||||
-rw-r--r-- | cpukit/rtems/src/ratemondata.c | 24 | ||||
-rw-r--r-- | cpukit/sapi/src/rtemsapi.c | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/sysinit.h | 1 |
6 files changed, 12 insertions, 50 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index 387710c69c..7cf28b93a1 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -128,7 +128,6 @@ librtems_a_SOURCES += src/ratemonreportstatistics.c librtems_a_SOURCES += src/ratemonident.c librtems_a_SOURCES += src/ratemonperiod.c librtems_a_SOURCES += src/ratemontimeout.c -librtems_a_SOURCES += src/ratemondata.c ## INTR_C_FILES librtems_a_SOURCES += src/intrbody.c diff --git a/cpukit/rtems/include/rtems/rtems/ratemonimpl.h b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h index b3aa1cf303..90724a4254 100644 --- a/cpukit/rtems/include/rtems/rtems/ratemonimpl.h +++ b/cpukit/rtems/include/rtems/rtems/ratemonimpl.h @@ -35,31 +35,12 @@ extern "C" { */ /** - * 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_RATEMON_EXTERN -#define RTEMS_RATEMON_EXTERN extern -#endif - -/** * @brief Rate Monotonic Period Class Management Structure * * This instance of Objects_Information is used to manage the * set of rate monotonic period instances. */ -RTEMS_RATEMON_EXTERN Objects_Information _Rate_monotonic_Information; - -/** - * @brief Rate Monotonic Manager Initialization - * - * This routine performs the initialization necessary for this manager. - * - * @note The Rate Monotonic Manager is built on top of the Watchdog Handler - */ -void _Rate_monotonic_Manager_initialization(void); +extern Objects_Information _Rate_monotonic_Information; /** * @brief Allocates a period control block from diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c index ad5083f75f..b0d248f18a 100644 --- a/cpukit/rtems/src/ratemon.c +++ b/cpukit/rtems/src/ratemon.c @@ -20,13 +20,14 @@ #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/isr.h> #include <rtems/rtems/ratemonimpl.h> -#include <rtems/score/thread.h> -void _Rate_monotonic_Manager_initialization(void) +Objects_Information _Rate_monotonic_Information; + +static void _Rate_monotonic_Manager_initialization(void) { _Objects_Initialize_information( &_Rate_monotonic_Information, /* object information table */ @@ -44,3 +45,9 @@ void _Rate_monotonic_Manager_initialization(void) #endif ); } + +RTEMS_SYSINIT_ITEM( + _Rate_monotonic_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/ratemondata.c b/cpukit/rtems/src/ratemondata.c deleted file mode 100644 index cb4c9ca3b7..0000000000 --- a/cpukit/rtems/src/ratemondata.c +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file - * - * @brief Instantiate RTEMS Period Data - * @ingroup ClassicRateMon - */ - -/* - * 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 - -/* instantiate RTEMS period data */ -#define RTEMS_RATEMON_EXTERN - -#include <rtems/rtems/ratemonimpl.h> diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c index b6ee1d8173..71f392bb04 100644 --- a/cpukit/sapi/src/rtemsapi.c +++ b/cpukit/sapi/src/rtemsapi.c @@ -28,10 +28,8 @@ #include <rtems/rtems/intr.h> #include <rtems/rtems/barrierimpl.h> #include <rtems/rtems/clock.h> -#include <rtems/rtems/ratemonimpl.h> void _RTEMS_API_Initialize(void) { - _Rate_monotonic_Manager_initialization(); _Barrier_Manager_initialization(); } diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h index 60687ecb7c..35806407a1 100644 --- a/cpukit/score/include/rtems/sysinit.h +++ b/cpukit/score/include/rtems/sysinit.h @@ -40,6 +40,7 @@ extern "C" { #define RTEMS_SYSINIT_CLASSIC_PARTITION 000346 #define RTEMS_SYSINIT_CLASSIC_REGION 000347 #define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 000348 +#define RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC 000349 #define RTEMS_SYSINIT_IDLE_THREADS 000380 #define RTEMS_SYSINIT_BSP_LIBC 000400 #define RTEMS_SYSINIT_BEFORE_DRIVERS 000500 |