diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 15:12:39 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:53 +0100 |
commit | af12278f9b33d7d8dca96d3873472ef2382f3c8e (patch) | |
tree | ebf8362e653d047eab45b59f0ebd53a21e8a5852 /cpukit | |
parent | Optional Classic Region initialization (diff) | |
download | rtems-af12278f9b33d7d8dca96d3873472ef2382f3c8e.tar.bz2 |
Optional Classic Dual-Ported Memory initialization
Update #2408.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/rtems/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/dpmemimpl.h | 19 | ||||
-rw-r--r-- | cpukit/rtems/src/dpmem.c | 13 | ||||
-rw-r--r-- | cpukit/rtems/src/dpmemdata.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, 48 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index c4bc9e8c60..387710c69c 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -237,7 +237,6 @@ librtems_a_SOURCES += src/dpmemdelete.c librtems_a_SOURCES += src/dpmemexternal2internal.c librtems_a_SOURCES += src/dpmemident.c librtems_a_SOURCES += src/dpmeminternal2external.c -librtems_a_SOURCES += src/dpmemdata.c ## WORKSPACE_FILES librtems_a_SOURCES += src/workspace.c diff --git a/cpukit/rtems/include/rtems/rtems/dpmemimpl.h b/cpukit/rtems/include/rtems/rtems/dpmemimpl.h index 3e0c231fad..213856dcdf 100644 --- a/cpukit/rtems/include/rtems/rtems/dpmemimpl.h +++ b/cpukit/rtems/include/rtems/rtems/dpmemimpl.h @@ -33,27 +33,10 @@ 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_DPMEM_EXTERN -#define RTEMS_DPMEM_EXTERN extern -#endif - -/** * @brief Define the internal Dual Ported Memory information * The following define the internal Dual Ported Memory information. */ -RTEMS_DPMEM_EXTERN Objects_Information _Dual_ported_memory_Information; - -/** - * @brief Dual Ported Memory Manager Initialization - * - * This routine performs the initialization necessary for this manager. - */ -void _Dual_ported_memory_Manager_initialization(void); +extern Objects_Information _Dual_ported_memory_Information; /** * @brief Allocates a port control block from the inactive chain diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c index 9af807e951..aca71a3a1f 100644 --- a/cpukit/rtems/src/dpmem.c +++ b/cpukit/rtems/src/dpmem.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/address.h> #include <rtems/rtems/dpmemimpl.h> -#include <rtems/score/thread.h> -void _Dual_ported_memory_Manager_initialization(void) +Objects_Information _Dual_ported_memory_Information; + +static void _Dual_ported_memory_Manager_initialization(void) { _Objects_Initialize_information( &_Dual_ported_memory_Information, /* object information table */ @@ -45,3 +46,9 @@ void _Dual_ported_memory_Manager_initialization(void) #endif ); } + +RTEMS_SYSINIT_ITEM( + _Dual_ported_memory_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/dpmemdata.c b/cpukit/rtems/src/dpmemdata.c deleted file mode 100644 index e315ef8cef..0000000000 --- a/cpukit/rtems/src/dpmemdata.c +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file - * - * @brief Define the internal Dual Ported Memory information - * @ingroup ClassicDPMEM Dual Ported Memory - */ - -/* - * 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 semaphore data */ -#define RTEMS_DPMEM_EXTERN - -#include <rtems/rtems/dpmemimpl.h> diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c index 8699c15e0d..b6ee1d8173 100644 --- a/cpukit/sapi/src/rtemsapi.c +++ b/cpukit/sapi/src/rtemsapi.c @@ -28,12 +28,10 @@ #include <rtems/rtems/intr.h> #include <rtems/rtems/barrierimpl.h> #include <rtems/rtems/clock.h> -#include <rtems/rtems/dpmemimpl.h> #include <rtems/rtems/ratemonimpl.h> void _RTEMS_API_Initialize(void) { - _Dual_ported_memory_Manager_initialization(); _Rate_monotonic_Manager_initialization(); _Barrier_Manager_initialization(); } diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h index b0a6e3263b..60687ecb7c 100644 --- a/cpukit/score/include/rtems/sysinit.h +++ b/cpukit/score/include/rtems/sysinit.h @@ -39,6 +39,7 @@ extern "C" { #define RTEMS_SYSINIT_CLASSIC_SEMAPHORE 000345 #define RTEMS_SYSINIT_CLASSIC_PARTITION 000346 #define RTEMS_SYSINIT_CLASSIC_REGION 000347 +#define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 000348 #define RTEMS_SYSINIT_IDLE_THREADS 000380 #define RTEMS_SYSINIT_BSP_LIBC 000400 #define RTEMS_SYSINIT_BEFORE_DRIVERS 000500 |