summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-14 15:10:32 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-03 10:00:53 +0100
commit365456cce3f3cf6da8a1bab9199e4bbd5f240dde (patch)
tree5fd6841b2e7dc032c0d654b0e0e9b35cab106637 /cpukit/rtems
parentOptional Classic Partition initialization (diff)
downloadrtems-365456cce3f3cf6da8a1bab9199e4bbd5f240dde.tar.bz2
Optional Classic Region initialization
Update #2408.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/Makefile.am1
-rw-r--r--cpukit/rtems/include/rtems/rtems/regionimpl.h25
-rw-r--r--cpukit/rtems/src/region.c13
-rw-r--r--cpukit/rtems/src/regiondata.c24
4 files changed, 11 insertions, 52 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 9d79278c0d..c4bc9e8c60 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -221,7 +221,6 @@ librtems_a_SOURCES += src/regiongetinfo.c
librtems_a_SOURCES += src/regiongetfreeinfo.c
librtems_a_SOURCES += src/regionresizesegment.c
librtems_a_SOURCES += src/regionprocessqueue.c
-librtems_a_SOURCES += src/regiondata.c
## PARTITION_C_FILES
librtems_a_SOURCES += src/part.c
diff --git a/cpukit/rtems/include/rtems/rtems/regionimpl.h b/cpukit/rtems/include/rtems/rtems/regionimpl.h
index 9f1c3b7e51..724a1c1a6e 100644
--- a/cpukit/rtems/include/rtems/rtems/regionimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/regionimpl.h
@@ -35,33 +35,10 @@ extern "C" {
*/
/**
- * @brief Instantiate RTEMS Region Data
- *
- * Region Manager -- Instantiate 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_REGION_EXTERN
-#define RTEMS_REGION_EXTERN extern
-#endif
-
-/**
* The following defines the information control block used to
* manage this class of objects.
*/
-RTEMS_REGION_EXTERN Objects_Information _Region_Information;
-
-/**
- * @brief _Region_Manager_initialization
- *
- * Region Manager
- *
- * This routine performs the initialization necessary for this manager.
- */
-void _Region_Manager_initialization(void);
+extern Objects_Information _Region_Information;
/**
* @brief Region_Allocate
diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c
index 8f12b5253a..f1c2b23a21 100644
--- a/cpukit/rtems/src/region.c
+++ b/cpukit/rtems/src/region.c
@@ -20,12 +20,13 @@
#include <rtems/system.h>
#include <rtems/config.h>
+#include <rtems/sysinit.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/rtems/options.h>
#include <rtems/rtems/regionimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/apimutex.h>
+
+Objects_Information _Region_Information;
/*
* _Region_Manager_initialization
@@ -37,7 +38,7 @@
* Output parameters: NONE
*/
-void _Region_Manager_initialization(void)
+static void _Region_Manager_initialization(void)
{
_Objects_Initialize_information(
&_Region_Information, /* object information table */
@@ -67,3 +68,9 @@ void _Region_Manager_initialization(void)
#endif
}
+
+RTEMS_SYSINIT_ITEM(
+ _Region_Manager_initialization,
+ RTEMS_SYSINIT_CLASSIC_REGION,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/cpukit/rtems/src/regiondata.c b/cpukit/rtems/src/regiondata.c
deleted file mode 100644
index 1f3b6a2c80..0000000000
--- a/cpukit/rtems/src/regiondata.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * @file
- *
- * @brief Instantiate RTEMS Region Data
- * @ingroup ClassicRegion Regions
- */
-
-/*
- * 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 Region data */
-#define RTEMS_REGION_EXTERN
-
-#include <rtems/rtems/regionimpl.h>