summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-21 23:19:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-21 23:19:36 +0000
commit6f1384cd4ff2518fbbde7fe99f4cbc7112ec14fc (patch)
tree75216d7fabbbe051420f24832c803ac74418ee7d
parent2007-05-21 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-6f1384cd4ff2518fbbde7fe99f4cbc7112ec14fc.tar.bz2
Split Classic API data instantiation into individual files. This reduces the size of the BSS section when an optional manageer stub is used. Some tests showed about a 600 byte reduction in BSS size. Also eliminated the variables _RTEMS_tasks_User_initialization_tasks and _RTEMS_tasks_Number_of_initialization_tasks because they were only used in one place after initialized. It was a waste of space.
Diffstat (limited to '')
-rw-r--r--cpukit/rtems/Makefile.am22
-rw-r--r--cpukit/rtems/include/rtems/rtems/barrier.h9
-rw-r--r--cpukit/rtems/include/rtems/rtems/dpmem.h10
-rw-r--r--cpukit/rtems/include/rtems/rtems/event.h9
-rw-r--r--cpukit/rtems/include/rtems/rtems/message.h10
-rw-r--r--cpukit/rtems/include/rtems/rtems/part.h10
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h7
-rw-r--r--cpukit/rtems/include/rtems/rtems/region.h11
-rw-r--r--cpukit/rtems/include/rtems/rtems/sem.h8
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h18
-rw-r--r--cpukit/rtems/include/rtems/rtems/timer.h11
-rw-r--r--cpukit/rtems/src/barrierdata.c23
-rw-r--r--cpukit/rtems/src/dpmem.c1
-rw-r--r--cpukit/rtems/src/dpmemdata.c22
-rw-r--r--cpukit/rtems/src/eventdata.c22
-rw-r--r--cpukit/rtems/src/msgdata.c23
-rw-r--r--cpukit/rtems/src/partdata.c22
-rw-r--r--cpukit/rtems/src/ratemondata.c22
-rw-r--r--cpukit/rtems/src/regiondata.c22
-rw-r--r--cpukit/rtems/src/rtemstimerdata.c22
-rw-r--r--cpukit/rtems/src/semdata.c22
-rw-r--r--cpukit/rtems/src/taskdata.c22
-rw-r--r--cpukit/rtems/src/taskinitusers.c9
-rw-r--r--cpukit/rtems/src/tasks.c16
-rw-r--r--cpukit/sapi/Makefile.am3
-rw-r--r--cpukit/sapi/include/rtems/extension.h12
-rw-r--r--cpukit/sapi/src/extensiondata.c23
-rw-r--r--cpukit/sapi/src/rtemsapi.c6
-rw-r--r--testsuites/sptests/spsize/size.c2
29 files changed, 350 insertions, 69 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 13405c03a4..1062221001 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -60,14 +60,15 @@ librtems_a_SOURCES += src/tasks.c src/taskcreate.c src/taskdelete.c \
src/taskissuspended.c src/taskmode.c src/taskrestart.c src/taskresume.c \
src/tasksetnote.c src/tasksetpriority.c src/taskstart.c \
src/tasksuspend.c src/taskwakeafter.c src/taskwakewhen.c \
- src/taskvariableadd.c src/taskvariabledelete.c src/taskvariableget.c
+ src/taskvariableadd.c src/taskvariabledelete.c src/taskvariableget.c \
+ src/taskdata.c
## RATEMON_C_FILES
librtems_a_SOURCES += src/ratemon.c src/ratemoncancel.c src/ratemoncreate.c \
src/ratemondelete.c src/ratemongetstatus.c src/ratemongetstatistics.c \
src/ratemonresetstatistics.c src/ratemonresetall.c \
src/ratemonreportstatistics.c src/ratemonident.c \
- src/ratemonperiod.c src/ratemontimeout.c
+ src/ratemonperiod.c src/ratemontimeout.c src/ratemondata.c
## INTR_C_FILES
librtems_a_SOURCES += src/intr.c src/intrbody.c src/intrcatch.c
@@ -75,7 +76,7 @@ librtems_a_SOURCES += src/intr.c src/intrbody.c src/intrcatch.c
## BARRIER_C_FILES
librtems_a_SOURCES += src/barrier.c src/barriercreate.c src/barrierdelete.c \
src/barrierident.c src/barriertranslatereturncode.c src/barrierrelease.c \
- src/barrierwait.c
+ src/barrierwait.c src/barrierdata.c
## CLOCK_C_FILES
librtems_a_SOURCES += src/rtclock.c src/clockget.c src/clockset.c \
@@ -86,22 +87,23 @@ librtems_a_SOURCES += src/rtclock.c src/clockget.c src/clockset.c \
librtems_a_SOURCES += src/rtemstimer.c src/timercancel.c src/timercreate.c \
src/timerdelete.c src/timerfireafter.c src/timerfirewhen.c \
src/timergetinfo.c src/timerident.c src/timerreset.c src/timerserver.c \
- src/timerserverfireafter.c src/timerserverfirewhen.c
+ src/timerserverfireafter.c src/timerserverfirewhen.c src/rtemstimerdata.c
## MESSAGE_QUEUE_C_FILES
librtems_a_SOURCES += src/msg.c src/msgqallocate.c src/msgqbroadcast.c \
src/msgqcreate.c src/msgqdelete.c src/msgqflush.c \
src/msgqgetnumberpending.c src/msgqident.c src/msgqreceive.c \
- src/msgqsend.c c src/msgqtranslatereturncode.c src/msgqurgent.c
+ src/msgqsend.c c src/msgqtranslatereturncode.c src/msgqurgent.c \
+ src/msgdata.c
## SEMAPHORE_C_FILES
librtems_a_SOURCES += src/sem.c src/semcreate.c src/semdelete.c src/semident.c \
src/semobtain.c src/semrelease.c src/semflush.c \
- src/semtranslatereturncode.c
+ src/semtranslatereturncode.c src/semdata.c
## EVENT_C_FILES
librtems_a_SOURCES += src/event.c src/eventreceive.c src/eventseize.c \
- src/eventsend.c src/eventsurrender.c src/eventtimeout.c
+ src/eventsend.c src/eventsurrender.c src/eventtimeout.c src/eventdata.c
## SIGNAL_C_FILES
librtems_a_SOURCES += src/signal.c src/signalcatch.c src/signalsend.c
@@ -111,16 +113,16 @@ librtems_a_SOURCES += src/region.c src/regioncreate.c src/regiondelete.c \
src/regionextend.c src/regiongetsegment.c src/regiongetsegmentsize.c \
src/regionident.c src/regionreturnsegment.c src/regiongetinfo.c \
src/regiongetfreeinfo.c src/regionresizesegment.c \
- src/regionprocessqueue.c
+ src/regionprocessqueue.c src/regiondata.c
## PARTITION_C_FILES
librtems_a_SOURCES += src/part.c src/partcreate.c src/partdelete.c \
- src/partgetbuffer.c src/partident.c src/partreturnbuffer.c
+ src/partgetbuffer.c src/partident.c src/partreturnbuffer.c src/partdata.c
## DPMEM_C_FILES
librtems_a_SOURCES += src/dpmem.c src/dpmemcreate.c src/dpmemdelete.c \
src/dpmemexternal2internal.c src/dpmemident.c \
- src/dpmeminternal2external.c
+ src/dpmeminternal2external.c src/dpmemdata.c
librtems_a_SOURCES += src/attr.c src/rtemsidtoname.c
diff --git a/cpukit/rtems/include/rtems/rtems/barrier.h b/cpukit/rtems/include/rtems/rtems/barrier.h
index f9c8e909ee..a00d2d97aa 100644
--- a/cpukit/rtems/include/rtems/rtems/barrier.h
+++ b/cpukit/rtems/include/rtems/rtems/barrier.h
@@ -14,7 +14,7 @@
* + wait for a barrier
* + signal a barrier
*
- * COPYRIGHT (c) 1989-2006.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -27,6 +27,10 @@
#ifndef _RTEMS_RTEMS_BARRIER_H
#define _RTEMS_RTEMS_BARRIER_H
+#ifndef RTEMS_BARRIER_EXTERN
+#define RTEMS_BARRIER_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -34,6 +38,7 @@ extern "C" {
#include <rtems/rtems/types.h>
#include <rtems/rtems/support.h>
#include <rtems/rtems/attr.h>
+#include <rtems/rtems/status.h>
#include <rtems/score/object.h>
#include <rtems/score/corebarrier.h>
@@ -55,7 +60,7 @@ typedef struct {
* this class of objects.
*/
-RTEMS_EXTERN Objects_Information _Barrier_Information;
+RTEMS_BARRIER_EXTERN Objects_Information _Barrier_Information;
/**
* @brief _Barrier_Manager_initialization
diff --git a/cpukit/rtems/include/rtems/rtems/dpmem.h b/cpukit/rtems/include/rtems/rtems/dpmem.h
index dc48eec822..37fbc2f445 100644
--- a/cpukit/rtems/include/rtems/rtems/dpmem.h
+++ b/cpukit/rtems/include/rtems/rtems/dpmem.h
@@ -17,7 +17,7 @@
* + convert internal to external address
*
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -30,11 +30,17 @@
#ifndef _RTEMS_RTEMS_DPMEM_H
#define _RTEMS_RTEMS_DPMEM_H
+#ifndef RTEMS_DPMEM_EXTERN
+#define RTEMS_DPMEM_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/score/object.h>
+#include <rtems/rtems/support.h>
+#include <rtems/rtems/status.h>
/*
* The following structure defines the port control block. Each port
@@ -53,7 +59,7 @@ typedef struct {
* The following define the internal Dual Ported Memory information.
*/
-RTEMS_EXTERN Objects_Information _Dual_ported_memory_Information;
+RTEMS_DPMEM_EXTERN Objects_Information _Dual_ported_memory_Information;
/*
* _Dual_ported_memory_Manager_initialization
diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h
index 6de5e76516..4d2b4513fe 100644
--- a/cpukit/rtems/include/rtems/rtems/event.h
+++ b/cpukit/rtems/include/rtems/rtems/event.h
@@ -13,7 +13,7 @@
* + receive event condition
*
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -26,11 +26,16 @@
#ifndef _RTEMS_RTEMS_EVENT_H
#define _RTEMS_RTEMS_EVENT_H
+#ifndef RTEMS_EVENT_EXTERN
+#define RTEMS_EVENT_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/score/object.h>
+#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>
#include <rtems/rtems/options.h>
#include <rtems/score/thread.h>
@@ -161,7 +166,7 @@ void _Event_Timeout (
* executing thread are received properly.
*/
-RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state;
+RTEMS_EVENT_EXTERN volatile Event_Sync_states _Event_Sync_state;
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/rtems/eventmp.h>
diff --git a/cpukit/rtems/include/rtems/rtems/message.h b/cpukit/rtems/include/rtems/rtems/message.h
index cef04eff8c..9425ddf3af 100644
--- a/cpukit/rtems/include/rtems/rtems/message.h
+++ b/cpukit/rtems/include/rtems/rtems/message.h
@@ -18,8 +18,7 @@
* + receive message from a queue
* + flush all messages on a queue
*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -32,11 +31,16 @@
#ifndef _RTEMS_RTEMS_MESSAGE_H
#define _RTEMS_RTEMS_MESSAGE_H
+#ifndef RTEMS_MESSAGE_EXTERN
+#define RTEMS_MESSAGE_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/rtems/types.h>
+#include <rtems/rtems/status.h>
#include <rtems/score/chain.h>
#include <rtems/score/object.h>
#include <rtems/rtems/attr.h>
@@ -69,7 +73,7 @@ typedef struct {
* manage this class of objects.
*/
-RTEMS_EXTERN Objects_Information _Message_queue_Information;
+RTEMS_MESSAGE_EXTERN Objects_Information _Message_queue_Information;
/*
* _Message_queue_Manager_initialization
diff --git a/cpukit/rtems/include/rtems/rtems/part.h b/cpukit/rtems/include/rtems/rtems/part.h
index 75a947d881..0e2eb496c4 100644
--- a/cpukit/rtems/include/rtems/rtems/part.h
+++ b/cpukit/rtems/include/rtems/rtems/part.h
@@ -16,7 +16,7 @@
* + get a buffer from a partition
* + return a buffer to a partition
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -29,6 +29,10 @@
#ifndef _RTEMS_RTEMS_PART_H
#define _RTEMS_RTEMS_PART_H
+#ifndef RTEMS_PART_EXTERN
+#define RTEMS_PART_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -36,6 +40,8 @@ extern "C" {
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/attr.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
#include <rtems/rtems/types.h>
/*
@@ -57,7 +63,7 @@ typedef struct {
* manage this class of objects.
*/
-RTEMS_EXTERN Objects_Information _Partition_Information;
+RTEMS_PART_EXTERN Objects_Information _Partition_Information;
/*
* _Partition_Manager_initialization
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 3492772e2c..66c2752bf3 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemon.h
@@ -28,6 +28,10 @@
#ifndef _RTEMS_RTEMS_RATEMON_H
#define _RTEMS_RTEMS_RATEMON_H
+#ifndef RTEMS_RATEMON_EXTERN
+#define RTEMS_RATEMON_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -50,6 +54,7 @@ extern "C" {
#include <rtems/score/thread.h>
#include <rtems/score/watchdog.h>
#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
#include <string.h>
@@ -145,7 +150,7 @@ typedef struct {
rtems_rate_monotonic_period_statistics Statistics;
} Rate_monotonic_Control;
-RTEMS_EXTERN Objects_Information _Rate_monotonic_Information;
+RTEMS_RATEMON_EXTERN Objects_Information _Rate_monotonic_Information;
/*
* _Rate_monotonic_Manager_initialization
diff --git a/cpukit/rtems/include/rtems/rtems/region.h b/cpukit/rtems/include/rtems/rtems/region.h
index 9c8a0cffa9..78cd7796a9 100644
--- a/cpukit/rtems/include/rtems/rtems/region.h
+++ b/cpukit/rtems/include/rtems/rtems/region.h
@@ -15,7 +15,7 @@
* + get a segment from a region
* + return a segment to a region
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -28,6 +28,10 @@
#ifndef _RTEMS_RTEMS_REGION_H
#define _RTEMS_RTEMS_REGION_H
+#ifndef RTEMS_REGION_EXTERN
+#define RTEMS_REGION_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -39,6 +43,9 @@ extern "C" {
#include <rtems/score/heap.h>
#include <rtems/debug.h>
#include <rtems/rtems/attr.h>
+#include <rtems/rtems/options.h>
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/support.h>
#include <rtems/rtems/types.h>
/*
@@ -63,7 +70,7 @@ typedef struct {
* manage this class of objects.
*/
-RTEMS_EXTERN Objects_Information _Region_Information;
+RTEMS_REGION_EXTERN Objects_Information _Region_Information;
/*
* _Region_Manager_initialization
diff --git a/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h
index 3c628717c4..a5cb09f3fd 100644
--- a/cpukit/rtems/include/rtems/rtems/sem.h
+++ b/cpukit/rtems/include/rtems/rtems/sem.h
@@ -16,7 +16,7 @@
* + acquire a semaphore
* + release a semaphore
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -29,6 +29,10 @@
#ifndef _RTEMS_RTEMS_SEM_H
#define _RTEMS_RTEMS_SEM_H
+#ifndef RTEMS_SEM_EXTERN
+#define RTEMS_SEM_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -59,7 +63,7 @@ typedef struct {
* this class of objects.
*/
-RTEMS_EXTERN Objects_Information _Semaphore_Information;
+RTEMS_SEM_EXTERN Objects_Information _Semaphore_Information;
/*
* _Semaphore_Manager_initialization
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index bc59c14921..a8efc5518e 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -36,6 +36,10 @@
#ifndef _RTEMS_RTEMS_TASKS_H
#define _RTEMS_RTEMS_TASKS_H
+#ifndef RTEMS_TASKS_EXTERN
+#define RTEMS_TASKS_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -166,15 +170,7 @@ typedef struct {
* manage this class of objects.
*/
-RTEMS_EXTERN Objects_Information _RTEMS_tasks_Information;
-
-/*
- * These are used to manage the user initialization tasks.
- */
-
-RTEMS_EXTERN rtems_initialization_tasks_table
- *_RTEMS_tasks_User_initialization_tasks;
-RTEMS_EXTERN uint32_t _RTEMS_tasks_Number_of_initialization_tasks;
+RTEMS_TASKS_EXTERN Objects_Information _RTEMS_tasks_Information;
/*
* _RTEMS_tasks_Manager_initialization
@@ -185,9 +181,7 @@ RTEMS_EXTERN uint32_t _RTEMS_tasks_Number_of_initialization_tasks;
*/
void _RTEMS_tasks_Manager_initialization(
- uint32_t maximum_tasks,
- uint32_t number_of_initialization_tasks,
- rtems_initialization_tasks_table *user_tasks
+ uint32_t maximum_tasks
);
/*
diff --git a/cpukit/rtems/include/rtems/rtems/timer.h b/cpukit/rtems/include/rtems/rtems/timer.h
index a246678480..fdb9185d00 100644
--- a/cpukit/rtems/include/rtems/rtems/timer.h
+++ b/cpukit/rtems/include/rtems/rtems/timer.h
@@ -23,7 +23,7 @@
* + reset a timer
* + cancel a time
*
- * COPYRIGHT (c) 1989-2002.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -36,12 +36,17 @@
#ifndef _RTEMS_RTEMS_TIMER_H
#define _RTEMS_RTEMS_TIMER_H
+#ifndef RTEMS_TIMER_EXTERN
+#define RTEMS_TIMER_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/score/object.h>
#include <rtems/score/watchdog.h>
+#include <rtems/score/thread.h>
#include <rtems/rtems/clock.h>
#include <rtems/rtems/attr.h>
@@ -74,7 +79,7 @@ typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
* this class of objects.
*/
-RTEMS_EXTERN Objects_Information _Timer_Information;
+RTEMS_TIMER_EXTERN Objects_Information _Timer_Information;
/*
* Pointer to TCB of the Timer Server. This is NULL before the
@@ -82,7 +87,7 @@ RTEMS_EXTERN Objects_Information _Timer_Information;
* initiated until the server is started.
*/
-RTEMS_EXTERN Thread_Control *_Timer_Server;
+RTEMS_TIMER_EXTERN Thread_Control *_Timer_Server;
/*
* The following chains contain the list of interval timers that are
diff --git a/cpukit/rtems/src/barrierdata.c b/cpukit/rtems/src/barrierdata.c
new file mode 100644
index 0000000000..6e4af5a4c8
--- /dev/null
+++ b/cpukit/rtems/src/barrierdata.c
@@ -0,0 +1,23 @@
+/*
+ * Barrier Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate barrier data */
+#define RTEMS_BARRIER_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/barrier.h>
+
diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c
index 27ded43f5f..6e730e6f75 100644
--- a/cpukit/rtems/src/dpmem.c
+++ b/cpukit/rtems/src/dpmem.c
@@ -22,7 +22,6 @@
#include <rtems/rtems/dpmem.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
-#include <rtems/rtems/dpmem.h>
/*PAGE
*
diff --git a/cpukit/rtems/src/dpmemdata.c b/cpukit/rtems/src/dpmemdata.c
new file mode 100644
index 0000000000..cc2285c1f6
--- /dev/null
+++ b/cpukit/rtems/src/dpmemdata.c
@@ -0,0 +1,22 @@
+/*
+ * Dual Port Memory Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate semaphore data */
+#define RTEMS_DPMEM_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/dpmem.h>
diff --git a/cpukit/rtems/src/eventdata.c b/cpukit/rtems/src/eventdata.c
new file mode 100644
index 0000000000..bc7eb466c1
--- /dev/null
+++ b/cpukit/rtems/src/eventdata.c
@@ -0,0 +1,22 @@
+/*
+ * Event Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate RTEMS event data */
+#define RTEMS_EVENT_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/event.h>
diff --git a/cpukit/rtems/src/msgdata.c b/cpukit/rtems/src/msgdata.c
new file mode 100644
index 0000000000..70baa35723
--- /dev/null
+++ b/cpukit/rtems/src/msgdata.c
@@ -0,0 +1,23 @@
+/*
+ * Barrier Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate message queue data */
+#define RTEMS_MESSAGE_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/message.h>
+
diff --git a/cpukit/rtems/src/partdata.c b/cpukit/rtems/src/partdata.c
new file mode 100644
index 0000000000..8f6c5b4531
--- /dev/null
+++ b/cpukit/rtems/src/partdata.c
@@ -0,0 +1,22 @@
+/*
+ * Partition Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate RTEMS partition data */
+#define RTEMS_PART_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/part.h>
diff --git a/cpukit/rtems/src/ratemondata.c b/cpukit/rtems/src/ratemondata.c
new file mode 100644
index 0000000000..efd461fa02
--- /dev/null
+++ b/cpukit/rtems/src/ratemondata.c
@@ -0,0 +1,22 @@
+/*
+ * Rate Monotonic Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate RTEMS period data */
+#define RTEMS_RATEMON_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/ratemon.h>
diff --git a/cpukit/rtems/src/regiondata.c b/cpukit/rtems/src/regiondata.c
new file mode 100644
index 0000000000..9ecce9e7bb
--- /dev/null
+++ b/cpukit/rtems/src/regiondata.c
@@ -0,0 +1,22 @@
+/*
+ * Region Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate RTEMS Region data */
+#define RTEMS_REGION_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/region.h>
diff --git a/cpukit/rtems/src/rtemstimerdata.c b/cpukit/rtems/src/rtemstimerdata.c
new file mode 100644
index 0000000000..b817c2f788
--- /dev/null
+++ b/cpukit/rtems/src/rtemstimerdata.c
@@ -0,0 +1,22 @@
+/*
+ * Timer Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate RTEMS timer data */
+#define RTEMS_TIMER_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/timer.h>
diff --git a/cpukit/rtems/src/semdata.c b/cpukit/rtems/src/semdata.c
new file mode 100644
index 0000000000..cc4126db15
--- /dev/null
+++ b/cpukit/rtems/src/semdata.c
@@ -0,0 +1,22 @@
+/*
+ * Semaphore Manager -- Data Instantiation
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate semaphore data */
+#define RTEMS_SEM_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/sem.h>
diff --git a/cpukit/rtems/src/taskdata.c b/cpukit/rtems/src/taskdata.c
new file mode 100644
index 0000000000..13c0a1f6e1
--- /dev/null
+++ b/cpukit/rtems/src/taskdata.c
@@ -0,0 +1,22 @@
+/*
+ * RTEMS Task Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate RTEMS Classic API tasks data */
+#define RTEMS_TASKS_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/rtems/tasks.h>
diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
index 3e0ae4b0f2..38e470f408 100644
--- a/cpukit/rtems/src/taskinitusers.c
+++ b/cpukit/rtems/src/taskinitusers.c
@@ -17,6 +17,7 @@
#endif
#include <rtems/system.h>
+#include <rtems/config.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/rtems/modes.h>
@@ -51,13 +52,17 @@ void _RTEMS_tasks_Initialize_user_tasks_body( void )
rtems_id id;
rtems_status_code return_value;
rtems_initialization_tasks_table *user_tasks;
+ rtems_api_configuration_table *api_configuration;
+
+
+ api_configuration = _Configuration_Table->RTEMS_api_configuration;
/*
* NOTE: This is slightly different from the Ada implementation.
*/
- user_tasks = _RTEMS_tasks_User_initialization_tasks;
- maximum = _RTEMS_tasks_Number_of_initialization_tasks;
+ user_tasks = api_configuration->User_initialization_tasks_table;
+ maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
return;
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index 963ec10368..78d50db831 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/rtems/src/tasks.c
@@ -1,8 +1,7 @@
/*
- * RTEMS Task Manager
+ * RTEMS Task Manager -- Initialize Manager
*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -243,19 +242,10 @@ User_extensions_Control _RTEMS_tasks_User_extensions = {
*/
void _RTEMS_tasks_Manager_initialization(
- uint32_t maximum_tasks,
- uint32_t number_of_initialization_tasks,
- rtems_initialization_tasks_table *user_tasks
+ uint32_t maximum_tasks
)
{
- _RTEMS_tasks_Number_of_initialization_tasks = number_of_initialization_tasks;
- _RTEMS_tasks_User_initialization_tasks = user_tasks;
-
- /*
- * There may not be any RTEMS initialization tasks configured.
- */
-
_Objects_Initialize_information(
&_RTEMS_tasks_Information, /* object information table */
OBJECTS_CLASSIC_API, /* object API */
diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am
index edb845aca2..531d0e779a 100644
--- a/cpukit/sapi/Makefile.am
+++ b/cpukit/sapi/Makefile.am
@@ -22,7 +22,8 @@ AM_CPPFLAGS += -D__RTEMS_INSIDE__
noinst_LIBRARIES = libsapi.a
libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \
src/extensiondelete.c src/extensionident.c src/fatal.c src/exinit.c \
- src/exshutdown.c src/io.c src/itronapi.c src/posixapi.c src/rtemsapi.c
+ src/exshutdown.c src/io.c src/itronapi.c src/posixapi.c src/rtemsapi.c \
+ src/extensiondata.c
libsapi_a_CPPFLAGS = $(AM_CPPFLAGS)
include $(srcdir)/preinstall.am
diff --git a/cpukit/sapi/include/rtems/extension.h b/cpukit/sapi/include/rtems/extension.h
index 65ac6ce280..a1f448c98e 100644
--- a/cpukit/sapi/include/rtems/extension.h
+++ b/cpukit/sapi/include/rtems/extension.h
@@ -13,7 +13,7 @@
* + get ID of user extension set
* + delete user extension set
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -26,14 +26,18 @@
#ifndef _RTEMS_EXTENSION_H
#define _RTEMS_EXTENSION_H
+#ifndef SAPI_EXT_EXTERN
+#define SAPI_EXT_EXTERN extern
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/score/object.h>
#include <rtems/score/userext.h>
-#include <rtems/rtems/status.h> /* XXX */
-#include <rtems/rtems/types.h> /* XXX */
+#include <rtems/rtems/status.h>
+#include <rtems/rtems/types.h>
/*
* Extension related types
@@ -58,7 +62,7 @@ typedef User_extensions_Table rtems_extensions_table;
* this class of objects.
*/
-SAPI_EXTERN Objects_Information _Extension_Information;
+SAPI_EXT_EXTERN Objects_Information _Extension_Information;
/*
* The following records define the control block used to manage
diff --git a/cpukit/sapi/src/extensiondata.c b/cpukit/sapi/src/extensiondata.c
new file mode 100644
index 0000000000..6057db5ee6
--- /dev/null
+++ b/cpukit/sapi/src/extensiondata.c
@@ -0,0 +1,23 @@
+/*
+ * Extension Manager -- Instantiate Data
+ *
+ * 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.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* instantiate extension data */
+#define SAPI_EXT_EXTERN
+
+#include <rtems/system.h>
+#include <rtems/extension.h>
+
diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c
index 23daa0700f..89d7411b5f 100644
--- a/cpukit/sapi/src/rtemsapi.c
+++ b/cpukit/sapi/src/rtemsapi.c
@@ -72,11 +72,7 @@ void _RTEMS_API_Initialize(
_Multiprocessing_Manager_initialization();
#endif
- _RTEMS_tasks_Manager_initialization(
- api_configuration->maximum_tasks,
- api_configuration->number_of_initialization_tasks,
- api_configuration->User_initialization_tasks_table
- );
+ _RTEMS_tasks_Manager_initialization( api_configuration->maximum_tasks );
_Timer_Manager_initialization( api_configuration->maximum_timers );
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 4540ba9ab5..908a991d58 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -344,8 +344,6 @@ uninitialized =
#endif
/*tasks.h*/ (sizeof _RTEMS_tasks_Information) +
- (sizeof _RTEMS_tasks_User_initialization_tasks) +
- (sizeof _RTEMS_tasks_Number_of_initialization_tasks) +
/*thread.h*/ (sizeof _Thread_BSP_context) +
(sizeof _Thread_Dispatch_disable_level) +