From 6f1384cd4ff2518fbbde7fe99f4cbc7112ec14fc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 21 May 2007 23:19:36 +0000 Subject: 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. --- cpukit/rtems/include/rtems/rtems/barrier.h | 9 +++++++-- cpukit/rtems/include/rtems/rtems/dpmem.h | 10 ++++++++-- cpukit/rtems/include/rtems/rtems/event.h | 9 +++++++-- cpukit/rtems/include/rtems/rtems/message.h | 10 +++++++--- cpukit/rtems/include/rtems/rtems/part.h | 10 ++++++++-- cpukit/rtems/include/rtems/rtems/ratemon.h | 7 ++++++- cpukit/rtems/include/rtems/rtems/region.h | 11 +++++++++-- cpukit/rtems/include/rtems/rtems/sem.h | 8 ++++++-- cpukit/rtems/include/rtems/rtems/tasks.h | 18 ++++++------------ cpukit/rtems/include/rtems/rtems/timer.h | 11 ++++++++--- 10 files changed, 72 insertions(+), 31 deletions(-) (limited to 'cpukit/rtems/include/rtems') 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 #include #include +#include #include #include @@ -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 +#include +#include /* * 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 +#include #include #include #include @@ -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 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 +#include #include #include #include @@ -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 #include #include +#include +#include #include /* @@ -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 #include #include +#include #include @@ -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 #include #include +#include +#include +#include #include /* @@ -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 #include +#include #include #include @@ -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 -- cgit v1.2.3