diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-28 21:40:52 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-05-28 21:40:52 +0000 |
commit | c627b2a3a1ca1a6aca1c20e133db0f95a65a71fb (patch) | |
tree | 8b369a80629ad635519105f923e1ca5a2a2bc87c | |
parent | added maximum keys (diff) | |
download | rtems-c627b2a3a1ca1a6aca1c20e133db0f95a65a71fb.tar.bz2 |
split the inclusion of "EXTERN" data based on whether it was sapi,
score, rtems api, or posix api related.
Diffstat (limited to '')
137 files changed, 559 insertions, 333 deletions
diff --git a/c/src/exec/posix/headers/cond.h b/c/src/exec/posix/headers/cond.h index 4448e38b6c..137871e0dc 100644 --- a/c/src/exec/posix/headers/cond.h +++ b/c/src/exec/posix/headers/cond.h @@ -40,7 +40,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Condition_variables_Information; +POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; /* * _POSIX_Condition_variables_Manager_initialization diff --git a/c/src/exec/posix/headers/intr.h b/c/src/exec/posix/headers/intr.h index ae1690f676..68c336ac0a 100644 --- a/c/src/exec/posix/headers/intr.h +++ b/c/src/exec/posix/headers/intr.h @@ -53,14 +53,15 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; +POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; /* * The following is an array which is used to manage the set of * interrupt handlers installed on each vector. */ -EXTERN POSIX_Interrupt_Control _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; +POSIX_EXTERN POSIX_Interrupt_Control + _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; /* * _POSIX_Interrupt_Manager_initialization diff --git a/c/src/exec/posix/headers/key.h b/c/src/exec/posix/headers/key.h index 0e690161b8..b552fec1d2 100644 --- a/c/src/exec/posix/headers/key.h +++ b/c/src/exec/posix/headers/key.h @@ -40,7 +40,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Keys_Information; +POSIX_EXTERN Objects_Information _POSIX_Keys_Information; /* * _POSIX_Keys_Manager_initialization diff --git a/c/src/exec/posix/headers/mqueue.h b/c/src/exec/posix/headers/mqueue.h index 5d5cfee61b..92691ce6dd 100644 --- a/c/src/exec/posix/headers/mqueue.h +++ b/c/src/exec/posix/headers/mqueue.h @@ -45,7 +45,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Message_queue_Information; +POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information; /* * _POSIX_Message_queue_Manager_initialization diff --git a/c/src/exec/posix/headers/mutex.h b/c/src/exec/posix/headers/mutex.h index 5639d908d2..0fb8ed6d5a 100644 --- a/c/src/exec/posix/headers/mutex.h +++ b/c/src/exec/posix/headers/mutex.h @@ -21,6 +21,9 @@ extern "C" { #endif +#include <rtems/score/coremutex.h> +#include <pthread.h> + /* * Data Structure used to manage a POSIX mutex */ @@ -36,7 +39,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Mutex_Information; +POSIX_EXTERN Objects_Information _POSIX_Mutex_Information; /* * _POSIX_Mutex_Manager_initialization diff --git a/c/src/exec/posix/headers/posixapi.h b/c/src/exec/posix/headers/posixapi.h new file mode 100644 index 0000000000..42c41da8c6 --- /dev/null +++ b/c/src/exec/posix/headers/posixapi.h @@ -0,0 +1,34 @@ +/* + * POSIX API Support + * + * NOTE: + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __POSIX_API_h +#define __POSIX_API_h + +#include <rtems/config.h> + +/*PAGE + * + * _POSIX_API_Initialize + * + * XXX + */ + +void _POSIX_API_Initialize( + rtems_configuration_table *configuration_table +); + +#endif +/* end of include file */ diff --git a/c/src/exec/posix/headers/pthread.h b/c/src/exec/posix/headers/pthread.h index 1ec9d9f193..9dca4705b7 100644 --- a/c/src/exec/posix/headers/pthread.h +++ b/c/src/exec/posix/headers/pthread.h @@ -35,15 +35,15 @@ typedef Thread_Control POSIX_Threads_Control; * this class of objects. */ -EXTERN Objects_Information _POSIX_Threads_Information; +POSIX_EXTERN Objects_Information _POSIX_Threads_Information; /* * These are used to manage the user initialization tasks. */ -EXTERN posix_initialization_tasks_table +POSIX_EXTERN posix_initialization_tasks_table *_POSIX_Threads_User_initialization_tasks; -EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_tasks; +POSIX_EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_tasks; /* diff --git a/c/src/exec/posix/headers/semaphore.h b/c/src/exec/posix/headers/semaphore.h index a538663989..b2334d8f66 100644 --- a/c/src/exec/posix/headers/semaphore.h +++ b/c/src/exec/posix/headers/semaphore.h @@ -41,7 +41,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Semaphore_Information; +POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; /* * _POSIX_Semaphore_Manager_initialization diff --git a/c/src/exec/posix/include/rtems/posix/cond.h b/c/src/exec/posix/include/rtems/posix/cond.h index 4448e38b6c..137871e0dc 100644 --- a/c/src/exec/posix/include/rtems/posix/cond.h +++ b/c/src/exec/posix/include/rtems/posix/cond.h @@ -40,7 +40,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Condition_variables_Information; +POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; /* * _POSIX_Condition_variables_Manager_initialization diff --git a/c/src/exec/posix/include/rtems/posix/intr.h b/c/src/exec/posix/include/rtems/posix/intr.h index ae1690f676..68c336ac0a 100644 --- a/c/src/exec/posix/include/rtems/posix/intr.h +++ b/c/src/exec/posix/include/rtems/posix/intr.h @@ -53,14 +53,15 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; +POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; /* * The following is an array which is used to manage the set of * interrupt handlers installed on each vector. */ -EXTERN POSIX_Interrupt_Control _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; +POSIX_EXTERN POSIX_Interrupt_Control + _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; /* * _POSIX_Interrupt_Manager_initialization diff --git a/c/src/exec/posix/include/rtems/posix/key.h b/c/src/exec/posix/include/rtems/posix/key.h index 0e690161b8..b552fec1d2 100644 --- a/c/src/exec/posix/include/rtems/posix/key.h +++ b/c/src/exec/posix/include/rtems/posix/key.h @@ -40,7 +40,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Keys_Information; +POSIX_EXTERN Objects_Information _POSIX_Keys_Information; /* * _POSIX_Keys_Manager_initialization diff --git a/c/src/exec/posix/include/rtems/posix/mqueue.h b/c/src/exec/posix/include/rtems/posix/mqueue.h index 5d5cfee61b..92691ce6dd 100644 --- a/c/src/exec/posix/include/rtems/posix/mqueue.h +++ b/c/src/exec/posix/include/rtems/posix/mqueue.h @@ -45,7 +45,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Message_queue_Information; +POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information; /* * _POSIX_Message_queue_Manager_initialization diff --git a/c/src/exec/posix/include/rtems/posix/mutex.h b/c/src/exec/posix/include/rtems/posix/mutex.h index 5639d908d2..0fb8ed6d5a 100644 --- a/c/src/exec/posix/include/rtems/posix/mutex.h +++ b/c/src/exec/posix/include/rtems/posix/mutex.h @@ -21,6 +21,9 @@ extern "C" { #endif +#include <rtems/score/coremutex.h> +#include <pthread.h> + /* * Data Structure used to manage a POSIX mutex */ @@ -36,7 +39,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Mutex_Information; +POSIX_EXTERN Objects_Information _POSIX_Mutex_Information; /* * _POSIX_Mutex_Manager_initialization diff --git a/c/src/exec/posix/include/rtems/posix/posixapi.h b/c/src/exec/posix/include/rtems/posix/posixapi.h new file mode 100644 index 0000000000..42c41da8c6 --- /dev/null +++ b/c/src/exec/posix/include/rtems/posix/posixapi.h @@ -0,0 +1,34 @@ +/* + * POSIX API Support + * + * NOTE: + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __POSIX_API_h +#define __POSIX_API_h + +#include <rtems/config.h> + +/*PAGE + * + * _POSIX_API_Initialize + * + * XXX + */ + +void _POSIX_API_Initialize( + rtems_configuration_table *configuration_table +); + +#endif +/* end of include file */ diff --git a/c/src/exec/posix/include/rtems/posix/pthread.h b/c/src/exec/posix/include/rtems/posix/pthread.h index 1ec9d9f193..9dca4705b7 100644 --- a/c/src/exec/posix/include/rtems/posix/pthread.h +++ b/c/src/exec/posix/include/rtems/posix/pthread.h @@ -35,15 +35,15 @@ typedef Thread_Control POSIX_Threads_Control; * this class of objects. */ -EXTERN Objects_Information _POSIX_Threads_Information; +POSIX_EXTERN Objects_Information _POSIX_Threads_Information; /* * These are used to manage the user initialization tasks. */ -EXTERN posix_initialization_tasks_table +POSIX_EXTERN posix_initialization_tasks_table *_POSIX_Threads_User_initialization_tasks; -EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_tasks; +POSIX_EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_tasks; /* diff --git a/c/src/exec/posix/include/rtems/posix/semaphore.h b/c/src/exec/posix/include/rtems/posix/semaphore.h index a538663989..b2334d8f66 100644 --- a/c/src/exec/posix/include/rtems/posix/semaphore.h +++ b/c/src/exec/posix/include/rtems/posix/semaphore.h @@ -41,7 +41,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Semaphore_Information; +POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; /* * _POSIX_Semaphore_Manager_initialization diff --git a/c/src/exec/rtems/headers/dpmem.h b/c/src/exec/rtems/headers/dpmem.h index fc580c1a8a..6f8893dd4b 100644 --- a/c/src/exec/rtems/headers/dpmem.h +++ b/c/src/exec/rtems/headers/dpmem.h @@ -51,7 +51,7 @@ typedef struct { * The following define the internal Dual Ported Memory information. */ -EXTERN Objects_Information _Dual_ported_memory_Information; +RTEMS_EXTERN Objects_Information _Dual_ported_memory_Information; /* * _Dual_ported_memory_Manager_initialization diff --git a/c/src/exec/rtems/headers/event.h b/c/src/exec/rtems/headers/event.h index 4cd3b1cbea..6cb9882da5 100644 --- a/c/src/exec/rtems/headers/event.h +++ b/c/src/exec/rtems/headers/event.h @@ -159,7 +159,7 @@ void _Event_Timeout ( * executing thread are received properly. */ -EXTERN volatile Event_Sync_states _Event_Sync_state; +RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state; #include <rtems/rtems/eventmp.h> #ifndef __RTEMS_APPLICATION__ diff --git a/c/src/exec/rtems/headers/message.h b/c/src/exec/rtems/headers/message.h index 0469f8ddbf..0f8fe9f1b1 100644 --- a/c/src/exec/rtems/headers/message.h +++ b/c/src/exec/rtems/headers/message.h @@ -68,7 +68,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Message_queue_Information; +RTEMS_EXTERN Objects_Information _Message_queue_Information; /* * _Message_queue_Manager_initialization diff --git a/c/src/exec/rtems/headers/part.h b/c/src/exec/rtems/headers/part.h index e06a2e4b86..c3410da9b3 100644 --- a/c/src/exec/rtems/headers/part.h +++ b/c/src/exec/rtems/headers/part.h @@ -55,7 +55,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Partition_Information; +RTEMS_EXTERN Objects_Information _Partition_Information; /* * _Partition_Manager_initialization diff --git a/c/src/exec/rtems/headers/ratemon.h b/c/src/exec/rtems/headers/ratemon.h index a85bbcdc09..85c17cf3eb 100644 --- a/c/src/exec/rtems/headers/ratemon.h +++ b/c/src/exec/rtems/headers/ratemon.h @@ -67,7 +67,7 @@ typedef struct { Thread_Control *owner; } Rate_monotonic_Control; -EXTERN Objects_Information _Rate_monotonic_Information; +RTEMS_EXTERN Objects_Information _Rate_monotonic_Information; /* * _Rate_monotonic_Manager_initialization diff --git a/c/src/exec/rtems/headers/region.h b/c/src/exec/rtems/headers/region.h index 7ee2658cd2..1683613087 100644 --- a/c/src/exec/rtems/headers/region.h +++ b/c/src/exec/rtems/headers/region.h @@ -59,7 +59,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Region_Information; +RTEMS_EXTERN Objects_Information _Region_Information; /* * _Region_Manager_initialization diff --git a/c/src/exec/rtems/headers/sem.h b/c/src/exec/rtems/headers/sem.h index c4f8574b17..cb47ee3548 100644 --- a/c/src/exec/rtems/headers/sem.h +++ b/c/src/exec/rtems/headers/sem.h @@ -58,7 +58,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _Semaphore_Information; +RTEMS_EXTERN Objects_Information _Semaphore_Information; /* * _Semaphore_Manager_initialization diff --git a/c/src/exec/rtems/headers/status.h b/c/src/exec/rtems/headers/status.h index 23c1c830c6..ac9b9d1046 100644 --- a/c/src/exec/rtems/headers/status.h +++ b/c/src/exec/rtems/headers/status.h @@ -60,7 +60,7 @@ typedef enum { extern rtems_status_code _Status_Object_name_errors_to_status[]; -#ifdef INIT +#ifdef RTEMS_API_INIT rtems_status_code _Status_Object_name_errors_to_status[] = { RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */ RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */ diff --git a/c/src/exec/rtems/headers/tasks.h b/c/src/exec/rtems/headers/tasks.h index 43f65dd5f3..dc30264635 100644 --- a/c/src/exec/rtems/headers/tasks.h +++ b/c/src/exec/rtems/headers/tasks.h @@ -164,14 +164,15 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _RTEMS_tasks_Information; +RTEMS_EXTERN Objects_Information _RTEMS_tasks_Information; /* * These are used to manage the user initialization tasks. */ -EXTERN rtems_initialization_tasks_table *_RTEMS_tasks_User_initialization_tasks; -EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks; +RTEMS_EXTERN rtems_initialization_tasks_table + *_RTEMS_tasks_User_initialization_tasks; +RTEMS_EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks; /* * _RTEMS_tasks_Manager_initialization diff --git a/c/src/exec/rtems/headers/timer.h b/c/src/exec/rtems/headers/timer.h index d09b80d5ff..197719c17b 100644 --- a/c/src/exec/rtems/headers/timer.h +++ b/c/src/exec/rtems/headers/timer.h @@ -64,7 +64,7 @@ typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )( * this class of objects. */ -EXTERN Objects_Information _Timer_Information; +RTEMS_EXTERN Objects_Information _Timer_Information; /* * The following records define the control block used to manage diff --git a/c/src/exec/rtems/include/rtems/rtems/dpmem.h b/c/src/exec/rtems/include/rtems/rtems/dpmem.h index fc580c1a8a..6f8893dd4b 100644 --- a/c/src/exec/rtems/include/rtems/rtems/dpmem.h +++ b/c/src/exec/rtems/include/rtems/rtems/dpmem.h @@ -51,7 +51,7 @@ typedef struct { * The following define the internal Dual Ported Memory information. */ -EXTERN Objects_Information _Dual_ported_memory_Information; +RTEMS_EXTERN Objects_Information _Dual_ported_memory_Information; /* * _Dual_ported_memory_Manager_initialization diff --git a/c/src/exec/rtems/include/rtems/rtems/event.h b/c/src/exec/rtems/include/rtems/rtems/event.h index 4cd3b1cbea..6cb9882da5 100644 --- a/c/src/exec/rtems/include/rtems/rtems/event.h +++ b/c/src/exec/rtems/include/rtems/rtems/event.h @@ -159,7 +159,7 @@ void _Event_Timeout ( * executing thread are received properly. */ -EXTERN volatile Event_Sync_states _Event_Sync_state; +RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state; #include <rtems/rtems/eventmp.h> #ifndef __RTEMS_APPLICATION__ diff --git a/c/src/exec/rtems/include/rtems/rtems/message.h b/c/src/exec/rtems/include/rtems/rtems/message.h index 0469f8ddbf..0f8fe9f1b1 100644 --- a/c/src/exec/rtems/include/rtems/rtems/message.h +++ b/c/src/exec/rtems/include/rtems/rtems/message.h @@ -68,7 +68,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Message_queue_Information; +RTEMS_EXTERN Objects_Information _Message_queue_Information; /* * _Message_queue_Manager_initialization diff --git a/c/src/exec/rtems/include/rtems/rtems/part.h b/c/src/exec/rtems/include/rtems/rtems/part.h index e06a2e4b86..c3410da9b3 100644 --- a/c/src/exec/rtems/include/rtems/rtems/part.h +++ b/c/src/exec/rtems/include/rtems/rtems/part.h @@ -55,7 +55,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Partition_Information; +RTEMS_EXTERN Objects_Information _Partition_Information; /* * _Partition_Manager_initialization diff --git a/c/src/exec/rtems/include/rtems/rtems/ratemon.h b/c/src/exec/rtems/include/rtems/rtems/ratemon.h index a85bbcdc09..85c17cf3eb 100644 --- a/c/src/exec/rtems/include/rtems/rtems/ratemon.h +++ b/c/src/exec/rtems/include/rtems/rtems/ratemon.h @@ -67,7 +67,7 @@ typedef struct { Thread_Control *owner; } Rate_monotonic_Control; -EXTERN Objects_Information _Rate_monotonic_Information; +RTEMS_EXTERN Objects_Information _Rate_monotonic_Information; /* * _Rate_monotonic_Manager_initialization diff --git a/c/src/exec/rtems/include/rtems/rtems/region.h b/c/src/exec/rtems/include/rtems/rtems/region.h index 7ee2658cd2..1683613087 100644 --- a/c/src/exec/rtems/include/rtems/rtems/region.h +++ b/c/src/exec/rtems/include/rtems/rtems/region.h @@ -59,7 +59,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Region_Information; +RTEMS_EXTERN Objects_Information _Region_Information; /* * _Region_Manager_initialization diff --git a/c/src/exec/rtems/include/rtems/rtems/sem.h b/c/src/exec/rtems/include/rtems/rtems/sem.h index c4f8574b17..cb47ee3548 100644 --- a/c/src/exec/rtems/include/rtems/rtems/sem.h +++ b/c/src/exec/rtems/include/rtems/rtems/sem.h @@ -58,7 +58,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _Semaphore_Information; +RTEMS_EXTERN Objects_Information _Semaphore_Information; /* * _Semaphore_Manager_initialization diff --git a/c/src/exec/rtems/include/rtems/rtems/status.h b/c/src/exec/rtems/include/rtems/rtems/status.h index 23c1c830c6..ac9b9d1046 100644 --- a/c/src/exec/rtems/include/rtems/rtems/status.h +++ b/c/src/exec/rtems/include/rtems/rtems/status.h @@ -60,7 +60,7 @@ typedef enum { extern rtems_status_code _Status_Object_name_errors_to_status[]; -#ifdef INIT +#ifdef RTEMS_API_INIT rtems_status_code _Status_Object_name_errors_to_status[] = { RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */ RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */ diff --git a/c/src/exec/rtems/include/rtems/rtems/tasks.h b/c/src/exec/rtems/include/rtems/rtems/tasks.h index 43f65dd5f3..dc30264635 100644 --- a/c/src/exec/rtems/include/rtems/rtems/tasks.h +++ b/c/src/exec/rtems/include/rtems/rtems/tasks.h @@ -164,14 +164,15 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _RTEMS_tasks_Information; +RTEMS_EXTERN Objects_Information _RTEMS_tasks_Information; /* * These are used to manage the user initialization tasks. */ -EXTERN rtems_initialization_tasks_table *_RTEMS_tasks_User_initialization_tasks; -EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks; +RTEMS_EXTERN rtems_initialization_tasks_table + *_RTEMS_tasks_User_initialization_tasks; +RTEMS_EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks; /* * _RTEMS_tasks_Manager_initialization diff --git a/c/src/exec/rtems/include/rtems/rtems/timer.h b/c/src/exec/rtems/include/rtems/rtems/timer.h index d09b80d5ff..197719c17b 100644 --- a/c/src/exec/rtems/include/rtems/rtems/timer.h +++ b/c/src/exec/rtems/include/rtems/rtems/timer.h @@ -64,7 +64,7 @@ typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )( * this class of objects. */ -EXTERN Objects_Information _Timer_Information; +RTEMS_EXTERN Objects_Information _Timer_Information; /* * The following records define the control block used to manage diff --git a/c/src/exec/sapi/headers/config.h b/c/src/exec/sapi/headers/config.h index 7ff0f9f485..19a8edeb0f 100644 --- a/c/src/exec/sapi/headers/config.h +++ b/c/src/exec/sapi/headers/config.h @@ -84,7 +84,7 @@ typedef struct { rtems_extensions_table *User_extension_table; rtems_multiprocessing_table *User_multiprocessing_table; rtems_api_configuration_table *RTEMS_api_configuration; - posix_api_configuration_table *Posix_api_configuration; + posix_api_configuration_table *POSIX_api_configuration; } rtems_configuration_table; /* @@ -92,8 +92,8 @@ typedef struct { * the user. They are not used in RTEMS itself. */ -EXTERN rtems_configuration_table *_Configuration_Table; -EXTERN rtems_multiprocessing_table *_Configuration_MP_table; +SAPI_EXTERN rtems_configuration_table *_Configuration_Table; +SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table; #ifdef __cplusplus } diff --git a/c/src/exec/sapi/headers/extension.h b/c/src/exec/sapi/headers/extension.h index 8f46ed80dd..ed95339348 100644 --- a/c/src/exec/sapi/headers/extension.h +++ b/c/src/exec/sapi/headers/extension.h @@ -54,7 +54,7 @@ typedef User_extensions_Table rtems_extensions_table; * this class of objects. */ -EXTERN Objects_Information _Extension_Information; +SAPI_EXTERN Objects_Information _Extension_Information; /* * The following records define the control block used to manage diff --git a/c/src/exec/sapi/headers/io.h b/c/src/exec/sapi/headers/io.h index a7af4df792..01042ce762 100644 --- a/c/src/exec/sapi/headers/io.h +++ b/c/src/exec/sapi/headers/io.h @@ -86,10 +86,10 @@ typedef struct { * Address Table and Device Name Table. */ -EXTERN unsigned32 _IO_Number_of_drivers; -EXTERN rtems_driver_address_table *_IO_Driver_address_table; -EXTERN unsigned32 _IO_Number_of_devices; -EXTERN rtems_driver_name_t *_IO_Driver_name_table; +SAPI_EXTERN unsigned32 _IO_Number_of_drivers; +SAPI_EXTERN rtems_driver_address_table *_IO_Driver_address_table; +SAPI_EXTERN unsigned32 _IO_Number_of_devices; +SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table; /* * _IO_Manager_initialization diff --git a/c/src/exec/sapi/include/rtems/config.h b/c/src/exec/sapi/include/rtems/config.h index 7ff0f9f485..19a8edeb0f 100644 --- a/c/src/exec/sapi/include/rtems/config.h +++ b/c/src/exec/sapi/include/rtems/config.h @@ -84,7 +84,7 @@ typedef struct { rtems_extensions_table *User_extension_table; rtems_multiprocessing_table *User_multiprocessing_table; rtems_api_configuration_table *RTEMS_api_configuration; - posix_api_configuration_table *Posix_api_configuration; + posix_api_configuration_table *POSIX_api_configuration; } rtems_configuration_table; /* @@ -92,8 +92,8 @@ typedef struct { * the user. They are not used in RTEMS itself. */ -EXTERN rtems_configuration_table *_Configuration_Table; -EXTERN rtems_multiprocessing_table *_Configuration_MP_table; +SAPI_EXTERN rtems_configuration_table *_Configuration_Table; +SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table; #ifdef __cplusplus } diff --git a/c/src/exec/sapi/include/rtems/extension.h b/c/src/exec/sapi/include/rtems/extension.h index 8f46ed80dd..ed95339348 100644 --- a/c/src/exec/sapi/include/rtems/extension.h +++ b/c/src/exec/sapi/include/rtems/extension.h @@ -54,7 +54,7 @@ typedef User_extensions_Table rtems_extensions_table; * this class of objects. */ -EXTERN Objects_Information _Extension_Information; +SAPI_EXTERN Objects_Information _Extension_Information; /* * The following records define the control block used to manage diff --git a/c/src/exec/sapi/include/rtems/io.h b/c/src/exec/sapi/include/rtems/io.h index a7af4df792..01042ce762 100644 --- a/c/src/exec/sapi/include/rtems/io.h +++ b/c/src/exec/sapi/include/rtems/io.h @@ -86,10 +86,10 @@ typedef struct { * Address Table and Device Name Table. */ -EXTERN unsigned32 _IO_Number_of_drivers; -EXTERN rtems_driver_address_table *_IO_Driver_address_table; -EXTERN unsigned32 _IO_Number_of_devices; -EXTERN rtems_driver_name_t *_IO_Driver_name_table; +SAPI_EXTERN unsigned32 _IO_Number_of_drivers; +SAPI_EXTERN rtems_driver_address_table *_IO_Driver_address_table; +SAPI_EXTERN unsigned32 _IO_Number_of_devices; +SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table; /* * _IO_Manager_initialization diff --git a/c/src/exec/sapi/src/exinit.c b/c/src/exec/sapi/src/exinit.c index 9e9f0d2040..442465dda4 100644 --- a/c/src/exec/sapi/src/exinit.c +++ b/c/src/exec/sapi/src/exinit.c @@ -13,11 +13,12 @@ */ /* - * INIT is defined so all of the data will be included in this - * file. + * SCORE_INIT and SAPI_INIT are defined so all of the super core and + * super API data will be included in this object file. */ -#define INIT +#define SAPI_INIT +#define SCORE_INIT #include <rtems/system.h> #include <rtems/config.h> @@ -44,7 +45,11 @@ #include <rtems/directives.h> #include <rtems/sptables.h> + #include <rtems/rtems/rtemsapi.h> +#ifdef RTEMS_POSIX_API +#include <rtems/posix/posixapi.h> +#endif /*PAGE * diff --git a/c/src/exec/sapi/src/posixapi.c b/c/src/exec/sapi/src/posixapi.c index 6efba79034..4ba236e42f 100644 --- a/c/src/exec/sapi/src/posixapi.c +++ b/c/src/exec/sapi/src/posixapi.c @@ -14,21 +14,27 @@ * $Id$ */ +#ifdef RTEMS_POSIX_API + #include <assert.h> -#include <rtems/system.h> +/* + * POSIX_API_INIT is defined so all of the POSIX API + * data will be included in this object file. + */ -#define INIT +#define POSIX_API_INIT +#include <rtems/system.h> + +#include <sys/types.h> +#include <rtems/config.h> #include <rtems/posix/cond.h> -#include <rtems/posix/condmp.h> #include <rtems/posix/config.h> #include <rtems/posix/key.h> #include <rtems/posix/mutex.h> -#include <rtems/posix/mutexmp.h> #include <rtems/posix/priority.h> #include <rtems/posix/pthread.h> -#include <rtems/posix/pthreadmp.h> #include <rtems/posix/time.h> /*PAGE @@ -48,20 +54,17 @@ void _POSIX_API_Initialize( assert( api_configuration ); - _RTEMS_tasks_Manager_initialization( - api_configuration->maximum_tasks -#if 0 -, + _POSIX_Threads_Manager_initialization( + api_configuration->maximum_threads, api_configuration->number_of_initialization_tasks, api_configuration->User_initialization_tasks_table -#endif ); _POSIX_Condition_variables_Manager_initialization( api_configuration->maximum_condition_variables ); - void _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); + _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); _POSIX_Mutex_Manager_initialization( api_configuration->maximum_mutexes @@ -69,4 +72,5 @@ void _POSIX_API_Initialize( } +#endif /* end of file */ diff --git a/c/src/exec/sapi/src/rtemsapi.c b/c/src/exec/sapi/src/rtemsapi.c index 0d1229a277..fe27507f2a 100644 --- a/c/src/exec/sapi/src/rtemsapi.c +++ b/c/src/exec/sapi/src/rtemsapi.c @@ -14,12 +14,17 @@ * $Id$ */ +/* + * RTEMS_API_INIT is defined so all of the RTEMS API + * data will be included in this object file. + */ + +#define RTEMS_API_INIT + #include <rtems/system.h> #include <rtems/rtems/status.h> #include <rtems/rtems/rtemsapi.h> -#define INIT - #include <rtems/rtems/intr.h> #include <rtems/rtems/clock.h> #include <rtems/rtems/tasks.h> diff --git a/c/src/exec/score/cpu/hppa1.1/cpu.h b/c/src/exec/score/cpu/hppa1.1/cpu.h index 1b6eb4d175..63d8b3019a 100644 --- a/c/src/exec/score/cpu/hppa1.1/cpu.h +++ b/c/src/exec/score/cpu/hppa1.1/cpu.h @@ -230,10 +230,10 @@ typedef struct { /* variables */ -EXTERN Context_Control_fp _CPU_Null_fp_context; -EXTERN unsigned32 _CPU_Default_gr27; -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; +SCORE_EXTERN unsigned32 _CPU_Default_gr27; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; #endif /* ! ASM */ diff --git a/c/src/exec/score/cpu/i386/cpu.h b/c/src/exec/score/cpu/i386/cpu.h index 85042fce66..9ef77aaef2 100644 --- a/c/src/exec/score/cpu/i386/cpu.h +++ b/c/src/exec/score/cpu/i386/cpu.h @@ -122,9 +122,9 @@ typedef struct { /* variables */ -EXTERN Context_Control_fp _CPU_Null_fp_context; -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; /* constants */ diff --git a/c/src/exec/score/cpu/i960/cpu.h b/c/src/exec/score/cpu/i960/cpu.h index 683d84659b..fbf0b1a25e 100644 --- a/c/src/exec/score/cpu/i960/cpu.h +++ b/c/src/exec/score/cpu/i960/cpu.h @@ -157,8 +157,8 @@ typedef struct { /* variables */ -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; /* constants */ diff --git a/c/src/exec/score/cpu/m68k/cpu.h b/c/src/exec/score/cpu/m68k/cpu.h index b0bf094cee..bc6943703f 100644 --- a/c/src/exec/score/cpu/m68k/cpu.h +++ b/c/src/exec/score/cpu/m68k/cpu.h @@ -148,10 +148,10 @@ typedef struct { /* variables */ -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; /* points to jsr-exception-table in targets wo/ VBR register */ -extern char _VBR[]; +extern char _VBR[]; /* constants */ diff --git a/c/src/exec/score/cpu/no_cpu/cpu.h b/c/src/exec/score/cpu/no_cpu/cpu.h index 7e80e3c018..81e4f2e626 100644 --- a/c/src/exec/score/cpu/no_cpu/cpu.h +++ b/c/src/exec/score/cpu/no_cpu/cpu.h @@ -352,7 +352,7 @@ typedef struct { * _CPU_Context_Initialize. */ -EXTERN Context_Control_fp _CPU_Null_fp_context; +SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; /* * On some CPUs, RTEMS supports a software managed interrupt stack. @@ -367,8 +367,8 @@ EXTERN Context_Control_fp _CPU_Null_fp_context; * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE. */ -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; /* * With some compilation systems, it is difficult if not impossible to @@ -380,7 +380,7 @@ EXTERN void *_CPU_Interrupt_stack_high; * sequence (if a dispatch is necessary). */ -EXTERN void (*_CPU_Thread_dispatch_pointer)(); +SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); /* * Nothing prevents the porter from declaring more CPU specific variables. diff --git a/c/src/exec/score/cpu/powerpc/cpu.h b/c/src/exec/score/cpu/powerpc/cpu.h index ce365a04ec..370e980695 100644 --- a/c/src/exec/score/cpu/powerpc/cpu.h +++ b/c/src/exec/score/cpu/powerpc/cpu.h @@ -473,8 +473,8 @@ typedef struct { * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE. */ -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; /* * With some compilation systems, it is difficult if not impossible to @@ -492,7 +492,7 @@ EXTERN void *_CPU_Interrupt_stack_high; * Nothing prevents the porter from declaring more CPU specific variables. */ -EXTERN struct { +SCORE_EXTERN struct { unsigned32 *Nest_level; unsigned32 *Disable_level; void *Vector_table; diff --git a/c/src/exec/score/cpu/sparc/cpu.h b/c/src/exec/score/cpu/sparc/cpu.h index 84280c94bf..b0d1255744 100644 --- a/c/src/exec/score/cpu/sparc/cpu.h +++ b/c/src/exec/score/cpu/sparc/cpu.h @@ -514,7 +514,7 @@ typedef struct { * context area during _CPU_Context_Initialize. */ -EXTERN Context_Control_fp _CPU_Null_fp_context CPU_STRUCTURE_ALIGNMENT; +SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context CPU_STRUCTURE_ALIGNMENT; /* * This stack is allocated by the Interrupt Manager and the switch @@ -529,8 +529,8 @@ EXTERN Context_Control_fp _CPU_Null_fp_context CPU_STRUCTURE_ALIGNMENT; * are required. */ -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; #if defined(erc32) @@ -538,7 +538,7 @@ EXTERN void *_CPU_Interrupt_stack_high; * ERC32 Specific Variables */ -EXTERN unsigned32 _ERC32_MEC_Timer_Control_Mirror; +SCORE_EXTERN unsigned32 _ERC32_MEC_Timer_Control_Mirror; #endif @@ -585,7 +585,7 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template; #define SPARC_TRAP_TABLE_ALIGNMENT 4096 -EXTERN unsigned8 _CPU_Trap_Table_area[ 8192 ] +SCORE_EXTERN unsigned8 _CPU_Trap_Table_area[ 8192 ] __attribute__ ((aligned (SPARC_TRAP_TABLE_ALIGNMENT))); diff --git a/c/src/exec/score/cpu/unix/cpu.h b/c/src/exec/score/cpu/unix/cpu.h index 8ead9c92b7..3c4899e983 100644 --- a/c/src/exec/score/cpu/unix/cpu.h +++ b/c/src/exec/score/cpu/unix/cpu.h @@ -491,7 +491,7 @@ typedef struct { * _CPU_Context_Initialize. */ -EXTERN Context_Control_fp _CPU_Null_fp_context; +SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; /* * On some CPUs, RTEMS supports a software managed interrupt stack. @@ -506,8 +506,8 @@ EXTERN Context_Control_fp _CPU_Null_fp_context; * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE. */ -EXTERN void *_CPU_Interrupt_stack_low; -EXTERN void *_CPU_Interrupt_stack_high; +SCORE_EXTERN void *_CPU_Interrupt_stack_low; +SCORE_EXTERN void *_CPU_Interrupt_stack_high; /* * With some compilation systems, it is difficult if not impossible to @@ -519,7 +519,7 @@ EXTERN void *_CPU_Interrupt_stack_high; * sequence (if a dispatch is necessary). */ -EXTERN void (*_CPU_Thread_dispatch_pointer)(); +SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); /* * Nothing prevents the porter from declaring more CPU specific variables. diff --git a/c/src/exec/score/headers/apiext.h b/c/src/exec/score/headers/apiext.h index 44e7bc8dd3..f9556f540a 100644 --- a/c/src/exec/score/headers/apiext.h +++ b/c/src/exec/score/headers/apiext.h @@ -43,7 +43,7 @@ typedef struct { * This is the list of API extensions to the system initialization. */ -EXTERN Chain_Control _API_extensions_List; +SCORE_EXTERN Chain_Control _API_extensions_List; /* * _API_extensions_Initialization diff --git a/c/src/exec/score/headers/bitfield.h b/c/src/exec/score/headers/bitfield.h index 6dbf1e0ba0..3fda9b4904 100644 --- a/c/src/exec/score/headers/bitfield.h +++ b/c/src/exec/score/headers/bitfield.h @@ -40,8 +40,8 @@ extern "C" { #if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE ) -#ifndef INIT - extern const unsigned char __log2table[256]; +#ifndef SCORE_INIT +extern const unsigned char __log2table[256]; #else const unsigned char __log2table[256] = { 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, diff --git a/c/src/exec/score/headers/context.h b/c/src/exec/score/headers/context.h index 4cd1f1e4c5..bd5c3b7126 100644 --- a/c/src/exec/score/headers/context.h +++ b/c/src/exec/score/headers/context.h @@ -35,7 +35,7 @@ extern "C" { * currently executing thread and given to the heir thread. */ -EXTERN boolean _Context_Switch_necessary; +SCORE_EXTERN boolean _Context_Switch_necessary; /* * _Context_Initialize diff --git a/c/src/exec/score/headers/copyrt.h b/c/src/exec/score/headers/copyrt.h index c711ba09b3..a146206f01 100644 --- a/c/src/exec/score/headers/copyrt.h +++ b/c/src/exec/score/headers/copyrt.h @@ -21,7 +21,7 @@ extern "C" { #endif -#ifdef INIT +#ifdef SCORE_INIT const char _Copyright_Notice[] = "COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.\n\ diff --git a/c/src/exec/score/headers/debug.h b/c/src/exec/score/headers/debug.h index afe6251bbe..c0cb20a7ea 100644 --- a/c/src/exec/score/headers/debug.h +++ b/c/src/exec/score/headers/debug.h @@ -40,7 +40,7 @@ typedef unsigned32 rtems_debug_control; * This variable contains the current debug level. */ -EXTERN rtems_debug_control _Debug_Level; +SCORE_EXTERN rtems_debug_control _Debug_Level; /* * _Debug_Manager_initialization diff --git a/c/src/exec/score/headers/interr.h b/c/src/exec/score/headers/interr.h index c2e8365953..3d315473b0 100644 --- a/c/src/exec/score/headers/interr.h +++ b/c/src/exec/score/headers/interr.h @@ -70,7 +70,7 @@ typedef struct { * When a fatal error occurs, the error information is stored here. */ -EXTERN Internal_errors_Information Internal_errors_What_happened; +SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened; /* * _Internal_error_Occurred diff --git a/c/src/exec/score/headers/isr.h b/c/src/exec/score/headers/isr.h index cf8f4cad59..c24b81eb5b 100644 --- a/c/src/exec/score/headers/isr.h +++ b/c/src/exec/score/headers/isr.h @@ -68,21 +68,21 @@ typedef ISR_Handler ( *ISR_Handler_entry )( * executing thread by an ISR handler. */ -EXTERN boolean _ISR_Signals_to_thread_executing; +SCORE_EXTERN boolean _ISR_Signals_to_thread_executing; /* * The following contains the interrupt service routine nest level. * When this variable is zero, a thread is executing. */ -EXTERN unsigned32 _ISR_Nest_level; +SCORE_EXTERN unsigned32 _ISR_Nest_level; /* * The following declares the Vector Table. Application * interrupt service routines are vectored by the ISR Handler via this table. */ -EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; +SCORE_EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; /* * _ISR_Handler_initialization diff --git a/c/src/exec/score/headers/mpci.h b/c/src/exec/score/headers/mpci.h index 25d7ac4094..a2533866c1 100644 --- a/c/src/exec/score/headers/mpci.h +++ b/c/src/exec/score/headers/mpci.h @@ -127,33 +127,34 @@ typedef struct { * This is the core semaphore which the MPCI Receive Server blocks on. */ -EXTERN CORE_semaphore_Control _MPCI_Semaphore; +SCORE_EXTERN CORE_semaphore_Control _MPCI_Semaphore; /* * The following thread queue is used to maintain a list of tasks * which currently have outstanding remote requests. */ -EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; +SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; /* * The following define the internal pointers to the user's * configuration information. */ -EXTERN MPCI_Control *_MPCI_table; +SCORE_EXTERN MPCI_Control *_MPCI_table; /* * The following points to the MPCI Receive Server. */ -EXTERN Thread_Control *_MPCI_Receive_server_tcb; +SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb; /* * The following table contains the process packet routines provided * by each object that supports MP operations. */ -EXTERN MPCI_Packet_processor _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1]; +SCORE_EXTERN MPCI_Packet_processor + _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1]; /* * _MPCI_Handler_initialization diff --git a/c/src/exec/score/headers/object.h b/c/src/exec/score/headers/object.h index 2d1588cf01..edd186c607 100644 --- a/c/src/exec/score/headers/object.h +++ b/c/src/exec/score/headers/object.h @@ -151,8 +151,8 @@ typedef struct { * node number of the local node. */ -EXTERN unsigned32 _Objects_Local_node; -EXTERN unsigned32 _Objects_Maximum_nodes; +SCORE_EXTERN unsigned32 _Objects_Local_node; +SCORE_EXTERN unsigned32 _Objects_Maximum_nodes; /* * The following is the list of information blocks for each object @@ -160,7 +160,7 @@ EXTERN unsigned32 _Objects_Maximum_nodes; * and obtain a pointer to the appropriate object control block. */ -EXTERN Objects_Information +SCORE_EXTERN Objects_Information *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1]; /* diff --git a/c/src/exec/score/headers/objectmp.h b/c/src/exec/score/headers/objectmp.h index 96496656df..178b5d1c04 100644 --- a/c/src/exec/score/headers/objectmp.h +++ b/c/src/exec/score/headers/objectmp.h @@ -137,8 +137,8 @@ void _Objects_MP_Is_remote ( * inactive global object control blocks. */ -EXTERN unsigned32 _Objects_MP_Maximum_global_objects; -EXTERN Chain_Control _Objects_MP_Inactive_global_objects; +SCORE_EXTERN unsigned32 _Objects_MP_Maximum_global_objects; +SCORE_EXTERN Chain_Control _Objects_MP_Inactive_global_objects; #ifndef __RTEMS_APPLICATION__ #include <rtems/score/objectmp.inl> diff --git a/c/src/exec/score/headers/priority.h b/c/src/exec/score/headers/priority.h index b7de14f0f9..a17870d868 100644 --- a/c/src/exec/score/headers/priority.h +++ b/c/src/exec/score/headers/priority.h @@ -58,8 +58,9 @@ typedef struct { * threads are ready at that priority. */ -EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map; -EXTERN Priority_Bit_map_control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; +SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map; +SCORE_EXTERN Priority_Bit_map_control + _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; /* * The definition of the Priority_Bit_map_control type is CPU dependent. diff --git a/c/src/exec/score/headers/sysstate.h b/c/src/exec/score/headers/sysstate.h index d7e43b2356..1e38549db7 100644 --- a/c/src/exec/score/headers/sysstate.h +++ b/c/src/exec/score/headers/sysstate.h @@ -44,13 +44,13 @@ typedef enum { * an multiprocessing system. */ -EXTERN boolean _System_state_Is_multiprocessing; +SCORE_EXTERN boolean _System_state_Is_multiprocessing; /* * The following variable contains the current system state. */ -EXTERN System_state_Codes _System_state_Current; +SCORE_EXTERN System_state_Codes _System_state_Current; /* * Make it possible for the application to get the system state information. diff --git a/c/src/exec/score/headers/system.h b/c/src/exec/score/headers/system.h index 9b50159c81..777a722588 100644 --- a/c/src/exec/score/headers/system.h +++ b/c/src/exec/score/headers/system.h @@ -36,16 +36,41 @@ extern "C" { /* * The following insures that all data is declared in the space - * of the Initialization Manager. It is referenced as "external" - * in every other file. + * of the initialization routine for either the Initialization Manager + * or the initialization file for the appropriate API. It is + * referenced as "external" in every other file. */ -#ifdef INIT -#undef EXTERN -#define EXTERN +#ifdef SCORE_INIT +#undef SCORE_EXTERN +#define SCORE_EXTERN #else -#undef EXTERN -#define EXTERN extern +#undef SCORE_EXTERN +#define SCORE_EXTERN extern +#endif + +#ifdef SAPI_INIT +#undef SAPI_EXTERN +#define SAPI_EXTERN +#else +#undef SAPI_EXTERN +#define SAPI_EXTERN extern +#endif + +#ifdef RTEMS_API_INIT +#undef RTEMS_EXTERN +#define RTEMS_EXTERN +#else +#undef RTEMS_EXTERN +#define RTEMS_EXTERN extern +#endif + +#ifdef POSIX_API_INIT +#undef POSIX_EXTERN +#define POSIX_EXTERN +#else +#undef POSIX_EXTERN +#define POSIX_EXTERN extern #endif /* @@ -118,7 +143,7 @@ extern const char _Copyright_Notice[]; /* RTEMS copyright string */ * The following defines the CPU dependent information table. */ -EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ +SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ /* * XXX weird RTEMS stuff diff --git a/c/src/exec/score/headers/thread.h b/c/src/exec/score/headers/thread.h index 74399545b9..a6c7591266 100644 --- a/c/src/exec/score/headers/thread.h +++ b/c/src/exec/score/headers/thread.h @@ -173,14 +173,14 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Thread_Internal_information; +SCORE_EXTERN Objects_Information _Thread_Internal_information; /* * The following define the thread control pointers used to access * and manipulate the idle thread. */ -EXTERN Thread_Control *_Thread_Idle; +SCORE_EXTERN Thread_Control *_Thread_Idle; /* * The following context area contains the context of the "thread" @@ -190,7 +190,7 @@ EXTERN Thread_Control *_Thread_Idle; * which initiated the system. */ -EXTERN Context_Control _Thread_BSP_context; +SCORE_EXTERN Context_Control _Thread_BSP_context; /* * The following declares the dispatch critical section nesting @@ -198,7 +198,7 @@ EXTERN Context_Control _Thread_BSP_context; * moments. */ -EXTERN unsigned32 _Thread_Dispatch_disable_level; +SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level; /* * The following holds how many user extensions are in the system. This @@ -206,28 +206,28 @@ EXTERN unsigned32 _Thread_Dispatch_disable_level; * per thread. */ -EXTERN unsigned32 _Thread_Maximum_extensions; +SCORE_EXTERN unsigned32 _Thread_Maximum_extensions; /* * The following data items are used to manage timeslicing. */ -EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice; -EXTERN unsigned32 _Thread_Ticks_per_timeslice; +SCORE_EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice; +SCORE_EXTERN unsigned32 _Thread_Ticks_per_timeslice; /* * The following points to the array of FIFOs used to manage the * set of ready threads. */ -EXTERN Chain_Control *_Thread_Ready_chain; +SCORE_EXTERN Chain_Control *_Thread_Ready_chain; /* * The following points to the thread which is currently executing. * This thread is implicitly manipulated by numerous directives. */ -EXTERN Thread_Control *_Thread_Executing; +SCORE_EXTERN Thread_Control *_Thread_Executing; /* * The following points to the highest priority ready thread @@ -236,14 +236,14 @@ EXTERN Thread_Control *_Thread_Executing; * dispatch occurs. */ -EXTERN Thread_Control *_Thread_Heir; +SCORE_EXTERN Thread_Control *_Thread_Heir; /* * The following points to the thread whose floating point * context is currently loaded. */ -EXTERN Thread_Control *_Thread_Allocated_fp; +SCORE_EXTERN Thread_Control *_Thread_Allocated_fp; /* * _Thread_Handler_initialization diff --git a/c/src/exec/score/headers/threadmp.h b/c/src/exec/score/headers/threadmp.h index 0466a04065..cd401e0ad8 100644 --- a/c/src/exec/score/headers/threadmp.h +++ b/c/src/exec/score/headers/threadmp.h @@ -68,14 +68,14 @@ Thread_Control *_Thread_MP_Find_proxy ( * blocking the multiprocessing receive thread. */ -EXTERN Thread_Control *_Thread_MP_Receive; +SCORE_EXTERN Thread_Control *_Thread_MP_Receive; /* * The following chains are used to manage proxies. */ -EXTERN Chain_Control _Thread_MP_Active_proxies; -EXTERN Chain_Control _Thread_MP_Inactive_proxies; +SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies; +SCORE_EXTERN Chain_Control _Thread_MP_Inactive_proxies; #ifndef __RTEMS_APPLICATION__ #include <rtems/score/threadmp.inl> diff --git a/c/src/exec/score/headers/threadq.h b/c/src/exec/score/headers/threadq.h index 6a074daf16..bfcb108db9 100644 --- a/c/src/exec/score/headers/threadq.h +++ b/c/src/exec/score/headers/threadq.h @@ -52,7 +52,7 @@ typedef void ( *Thread_queue_Extract_callout )( Thread_Control * ); -EXTERN Thread_queue_Extract_callout +SCORE_EXTERN Thread_queue_Extract_callout _Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ]; /* diff --git a/c/src/exec/score/headers/tod.h b/c/src/exec/score/headers/tod.h index b0fb686014..3dd4e6d823 100644 --- a/c/src/exec/score/headers/tod.h +++ b/c/src/exec/score/headers/tod.h @@ -69,27 +69,27 @@ typedef struct { /* RTEID style time/date */ * The following contains the current time of day. */ -EXTERN TOD_Control _TOD_Current; +SCORE_EXTERN TOD_Control _TOD_Current; /* * The following contains the number of seconds from 00:00:00 * January 1, TOD_BASE_YEAR until the current time of day. */ -EXTERN Watchdog_Interval _TOD_Seconds_since_epoch; +SCORE_EXTERN Watchdog_Interval _TOD_Seconds_since_epoch; /* * The following contains the number of ticks since the * system was booted. */ -EXTERN Watchdog_Interval _TOD_Ticks_since_boot; +SCORE_EXTERN Watchdog_Interval _TOD_Ticks_since_boot; /* * The following contains the number of microseconds per tick. */ -EXTERN unsigned32 _TOD_Microseconds_per_tick; +SCORE_EXTERN unsigned32 _TOD_Microseconds_per_tick; /* * The following contains the number of clock ticks per second. @@ -102,16 +102,16 @@ EXTERN unsigned32 _TOD_Microseconds_per_tick; * can be a source of error in the current time of day. */ -EXTERN unsigned32 _TOD_Ticks_per_second; +SCORE_EXTERN unsigned32 _TOD_Ticks_per_second; /* * This is the control structure for the watchdog timer which * fires to service the seconds chain. */ -EXTERN Watchdog_Control _TOD_Seconds_watchdog; +SCORE_EXTERN Watchdog_Control _TOD_Seconds_watchdog; -#ifdef INIT +#ifdef SCORE_INIT /* * The following array contains the number of days in all months. diff --git a/c/src/exec/score/headers/userext.h b/c/src/exec/score/headers/userext.h index 1a6ac3437e..5ef2b4e30e 100644 --- a/c/src/exec/score/headers/userext.h +++ b/c/src/exec/score/headers/userext.h @@ -100,13 +100,13 @@ typedef struct { * configured by the application. */ -EXTERN User_extensions_Control _User_extensions_Initial; +SCORE_EXTERN User_extensions_Control _User_extensions_Initial; /* * The following is used to manage the list of active extensions. */ -EXTERN Chain_Control _User_extensions_List; +SCORE_EXTERN Chain_Control _User_extensions_List; /* * _User_extensions_Thread_create diff --git a/c/src/exec/score/headers/watchdog.h b/c/src/exec/score/headers/watchdog.h index 9b13407c8e..8a43be1f1f 100644 --- a/c/src/exec/score/headers/watchdog.h +++ b/c/src/exec/score/headers/watchdog.h @@ -92,16 +92,16 @@ typedef struct { * during an insert on a watchdog delta chain. */ -EXTERN volatile unsigned32 _Watchdog_Sync_level; -EXTERN volatile unsigned32 _Watchdog_Sync_count; +SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_level; +SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_count; /* * The following defines the watchdog chains which are managed * on ticks and second boundaries. */ -EXTERN Chain_Control _Watchdog_Ticks_chain; -EXTERN Chain_Control _Watchdog_Seconds_chain; +SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain; +SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain; /* * _Watchdog_Handler_initialization diff --git a/c/src/exec/score/headers/wkspace.h b/c/src/exec/score/headers/wkspace.h index 9814a707b1..b351663ee5 100644 --- a/c/src/exec/score/headers/wkspace.h +++ b/c/src/exec/score/headers/wkspace.h @@ -30,7 +30,7 @@ extern "C" { * */ -EXTERN Heap_Control _Workspace_Area; /* executive heap header */ +SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */ /* * _Workspace_Handler_initialization diff --git a/c/src/exec/score/include/rtems/debug.h b/c/src/exec/score/include/rtems/debug.h index afe6251bbe..c0cb20a7ea 100644 --- a/c/src/exec/score/include/rtems/debug.h +++ b/c/src/exec/score/include/rtems/debug.h @@ -40,7 +40,7 @@ typedef unsigned32 rtems_debug_control; * This variable contains the current debug level. */ -EXTERN rtems_debug_control _Debug_Level; +SCORE_EXTERN rtems_debug_control _Debug_Level; /* * _Debug_Manager_initialization diff --git a/c/src/exec/score/include/rtems/score/apiext.h b/c/src/exec/score/include/rtems/score/apiext.h index 44e7bc8dd3..f9556f540a 100644 --- a/c/src/exec/score/include/rtems/score/apiext.h +++ b/c/src/exec/score/include/rtems/score/apiext.h @@ -43,7 +43,7 @@ typedef struct { * This is the list of API extensions to the system initialization. */ -EXTERN Chain_Control _API_extensions_List; +SCORE_EXTERN Chain_Control _API_extensions_List; /* * _API_extensions_Initialization diff --git a/c/src/exec/score/include/rtems/score/bitfield.h b/c/src/exec/score/include/rtems/score/bitfield.h index 6dbf1e0ba0..3fda9b4904 100644 --- a/c/src/exec/score/include/rtems/score/bitfield.h +++ b/c/src/exec/score/include/rtems/score/bitfield.h @@ -40,8 +40,8 @@ extern "C" { #if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE ) -#ifndef INIT - extern const unsigned char __log2table[256]; +#ifndef SCORE_INIT +extern const unsigned char __log2table[256]; #else const unsigned char __log2table[256] = { 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, diff --git a/c/src/exec/score/include/rtems/score/context.h b/c/src/exec/score/include/rtems/score/context.h index 4cd1f1e4c5..bd5c3b7126 100644 --- a/c/src/exec/score/include/rtems/score/context.h +++ b/c/src/exec/score/include/rtems/score/context.h @@ -35,7 +35,7 @@ extern "C" { * currently executing thread and given to the heir thread. */ -EXTERN boolean _Context_Switch_necessary; +SCORE_EXTERN boolean _Context_Switch_necessary; /* * _Context_Initialize diff --git a/c/src/exec/score/include/rtems/score/copyrt.h b/c/src/exec/score/include/rtems/score/copyrt.h index c711ba09b3..a146206f01 100644 --- a/c/src/exec/score/include/rtems/score/copyrt.h +++ b/c/src/exec/score/include/rtems/score/copyrt.h @@ -21,7 +21,7 @@ extern "C" { #endif -#ifdef INIT +#ifdef SCORE_INIT const char _Copyright_Notice[] = "COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.\n\ diff --git a/c/src/exec/score/include/rtems/score/interr.h b/c/src/exec/score/include/rtems/score/interr.h index c2e8365953..3d315473b0 100644 --- a/c/src/exec/score/include/rtems/score/interr.h +++ b/c/src/exec/score/include/rtems/score/interr.h @@ -70,7 +70,7 @@ typedef struct { * When a fatal error occurs, the error information is stored here. */ -EXTERN Internal_errors_Information Internal_errors_What_happened; +SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened; /* * _Internal_error_Occurred diff --git a/c/src/exec/score/include/rtems/score/isr.h b/c/src/exec/score/include/rtems/score/isr.h index cf8f4cad59..c24b81eb5b 100644 --- a/c/src/exec/score/include/rtems/score/isr.h +++ b/c/src/exec/score/include/rtems/score/isr.h @@ -68,21 +68,21 @@ typedef ISR_Handler ( *ISR_Handler_entry )( * executing thread by an ISR handler. */ -EXTERN boolean _ISR_Signals_to_thread_executing; +SCORE_EXTERN boolean _ISR_Signals_to_thread_executing; /* * The following contains the interrupt service routine nest level. * When this variable is zero, a thread is executing. */ -EXTERN unsigned32 _ISR_Nest_level; +SCORE_EXTERN unsigned32 _ISR_Nest_level; /* * The following declares the Vector Table. Application * interrupt service routines are vectored by the ISR Handler via this table. */ -EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; +SCORE_EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; /* * _ISR_Handler_initialization diff --git a/c/src/exec/score/include/rtems/score/mpci.h b/c/src/exec/score/include/rtems/score/mpci.h index 25d7ac4094..a2533866c1 100644 --- a/c/src/exec/score/include/rtems/score/mpci.h +++ b/c/src/exec/score/include/rtems/score/mpci.h @@ -127,33 +127,34 @@ typedef struct { * This is the core semaphore which the MPCI Receive Server blocks on. */ -EXTERN CORE_semaphore_Control _MPCI_Semaphore; +SCORE_EXTERN CORE_semaphore_Control _MPCI_Semaphore; /* * The following thread queue is used to maintain a list of tasks * which currently have outstanding remote requests. */ -EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; +SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; /* * The following define the internal pointers to the user's * configuration information. */ -EXTERN MPCI_Control *_MPCI_table; +SCORE_EXTERN MPCI_Control *_MPCI_table; /* * The following points to the MPCI Receive Server. */ -EXTERN Thread_Control *_MPCI_Receive_server_tcb; +SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb; /* * The following table contains the process packet routines provided * by each object that supports MP operations. */ -EXTERN MPCI_Packet_processor _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1]; +SCORE_EXTERN MPCI_Packet_processor + _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1]; /* * _MPCI_Handler_initialization diff --git a/c/src/exec/score/include/rtems/score/object.h b/c/src/exec/score/include/rtems/score/object.h index 2d1588cf01..edd186c607 100644 --- a/c/src/exec/score/include/rtems/score/object.h +++ b/c/src/exec/score/include/rtems/score/object.h @@ -151,8 +151,8 @@ typedef struct { * node number of the local node. */ -EXTERN unsigned32 _Objects_Local_node; -EXTERN unsigned32 _Objects_Maximum_nodes; +SCORE_EXTERN unsigned32 _Objects_Local_node; +SCORE_EXTERN unsigned32 _Objects_Maximum_nodes; /* * The following is the list of information blocks for each object @@ -160,7 +160,7 @@ EXTERN unsigned32 _Objects_Maximum_nodes; * and obtain a pointer to the appropriate object control block. */ -EXTERN Objects_Information +SCORE_EXTERN Objects_Information *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1]; /* diff --git a/c/src/exec/score/include/rtems/score/objectmp.h b/c/src/exec/score/include/rtems/score/objectmp.h index 96496656df..178b5d1c04 100644 --- a/c/src/exec/score/include/rtems/score/objectmp.h +++ b/c/src/exec/score/include/rtems/score/objectmp.h @@ -137,8 +137,8 @@ void _Objects_MP_Is_remote ( * inactive global object control blocks. */ -EXTERN unsigned32 _Objects_MP_Maximum_global_objects; -EXTERN Chain_Control _Objects_MP_Inactive_global_objects; +SCORE_EXTERN unsigned32 _Objects_MP_Maximum_global_objects; +SCORE_EXTERN Chain_Control _Objects_MP_Inactive_global_objects; #ifndef __RTEMS_APPLICATION__ #include <rtems/score/objectmp.inl> diff --git a/c/src/exec/score/include/rtems/score/priority.h b/c/src/exec/score/include/rtems/score/priority.h index b7de14f0f9..a17870d868 100644 --- a/c/src/exec/score/include/rtems/score/priority.h +++ b/c/src/exec/score/include/rtems/score/priority.h @@ -58,8 +58,9 @@ typedef struct { * threads are ready at that priority. */ -EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map; -EXTERN Priority_Bit_map_control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; +SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map; +SCORE_EXTERN Priority_Bit_map_control + _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; /* * The definition of the Priority_Bit_map_control type is CPU dependent. diff --git a/c/src/exec/score/include/rtems/score/sysstate.h b/c/src/exec/score/include/rtems/score/sysstate.h index d7e43b2356..1e38549db7 100644 --- a/c/src/exec/score/include/rtems/score/sysstate.h +++ b/c/src/exec/score/include/rtems/score/sysstate.h @@ -44,13 +44,13 @@ typedef enum { * an multiprocessing system. */ -EXTERN boolean _System_state_Is_multiprocessing; +SCORE_EXTERN boolean _System_state_Is_multiprocessing; /* * The following variable contains the current system state. */ -EXTERN System_state_Codes _System_state_Current; +SCORE_EXTERN System_state_Codes _System_state_Current; /* * Make it possible for the application to get the system state information. diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h index 74399545b9..a6c7591266 100644 --- a/c/src/exec/score/include/rtems/score/thread.h +++ b/c/src/exec/score/include/rtems/score/thread.h @@ -173,14 +173,14 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Thread_Internal_information; +SCORE_EXTERN Objects_Information _Thread_Internal_information; /* * The following define the thread control pointers used to access * and manipulate the idle thread. */ -EXTERN Thread_Control *_Thread_Idle; +SCORE_EXTERN Thread_Control *_Thread_Idle; /* * The following context area contains the context of the "thread" @@ -190,7 +190,7 @@ EXTERN Thread_Control *_Thread_Idle; * which initiated the system. */ -EXTERN Context_Control _Thread_BSP_context; +SCORE_EXTERN Context_Control _Thread_BSP_context; /* * The following declares the dispatch critical section nesting @@ -198,7 +198,7 @@ EXTERN Context_Control _Thread_BSP_context; * moments. */ -EXTERN unsigned32 _Thread_Dispatch_disable_level; +SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level; /* * The following holds how many user extensions are in the system. This @@ -206,28 +206,28 @@ EXTERN unsigned32 _Thread_Dispatch_disable_level; * per thread. */ -EXTERN unsigned32 _Thread_Maximum_extensions; +SCORE_EXTERN unsigned32 _Thread_Maximum_extensions; /* * The following data items are used to manage timeslicing. */ -EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice; -EXTERN unsigned32 _Thread_Ticks_per_timeslice; +SCORE_EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice; +SCORE_EXTERN unsigned32 _Thread_Ticks_per_timeslice; /* * The following points to the array of FIFOs used to manage the * set of ready threads. */ -EXTERN Chain_Control *_Thread_Ready_chain; +SCORE_EXTERN Chain_Control *_Thread_Ready_chain; /* * The following points to the thread which is currently executing. * This thread is implicitly manipulated by numerous directives. */ -EXTERN Thread_Control *_Thread_Executing; +SCORE_EXTERN Thread_Control *_Thread_Executing; /* * The following points to the highest priority ready thread @@ -236,14 +236,14 @@ EXTERN Thread_Control *_Thread_Executing; * dispatch occurs. */ -EXTERN Thread_Control *_Thread_Heir; +SCORE_EXTERN Thread_Control *_Thread_Heir; /* * The following points to the thread whose floating point * context is currently loaded. */ -EXTERN Thread_Control *_Thread_Allocated_fp; +SCORE_EXTERN Thread_Control *_Thread_Allocated_fp; /* * _Thread_Handler_initialization diff --git a/c/src/exec/score/include/rtems/score/threadmp.h b/c/src/exec/score/include/rtems/score/threadmp.h index 0466a04065..cd401e0ad8 100644 --- a/c/src/exec/score/include/rtems/score/threadmp.h +++ b/c/src/exec/score/include/rtems/score/threadmp.h @@ -68,14 +68,14 @@ Thread_Control *_Thread_MP_Find_proxy ( * blocking the multiprocessing receive thread. */ -EXTERN Thread_Control *_Thread_MP_Receive; +SCORE_EXTERN Thread_Control *_Thread_MP_Receive; /* * The following chains are used to manage proxies. */ -EXTERN Chain_Control _Thread_MP_Active_proxies; -EXTERN Chain_Control _Thread_MP_Inactive_proxies; +SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies; +SCORE_EXTERN Chain_Control _Thread_MP_Inactive_proxies; #ifndef __RTEMS_APPLICATION__ #include <rtems/score/threadmp.inl> diff --git a/c/src/exec/score/include/rtems/score/threadq.h b/c/src/exec/score/include/rtems/score/threadq.h index 6a074daf16..bfcb108db9 100644 --- a/c/src/exec/score/include/rtems/score/threadq.h +++ b/c/src/exec/score/include/rtems/score/threadq.h @@ -52,7 +52,7 @@ typedef void ( *Thread_queue_Extract_callout )( Thread_Control * ); -EXTERN Thread_queue_Extract_callout +SCORE_EXTERN Thread_queue_Extract_callout _Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ]; /* diff --git a/c/src/exec/score/include/rtems/score/tod.h b/c/src/exec/score/include/rtems/score/tod.h index b0fb686014..3dd4e6d823 100644 --- a/c/src/exec/score/include/rtems/score/tod.h +++ b/c/src/exec/score/include/rtems/score/tod.h @@ -69,27 +69,27 @@ typedef struct { /* RTEID style time/date */ * The following contains the current time of day. */ -EXTERN TOD_Control _TOD_Current; +SCORE_EXTERN TOD_Control _TOD_Current; /* * The following contains the number of seconds from 00:00:00 * January 1, TOD_BASE_YEAR until the current time of day. */ -EXTERN Watchdog_Interval _TOD_Seconds_since_epoch; +SCORE_EXTERN Watchdog_Interval _TOD_Seconds_since_epoch; /* * The following contains the number of ticks since the * system was booted. */ -EXTERN Watchdog_Interval _TOD_Ticks_since_boot; +SCORE_EXTERN Watchdog_Interval _TOD_Ticks_since_boot; /* * The following contains the number of microseconds per tick. */ -EXTERN unsigned32 _TOD_Microseconds_per_tick; +SCORE_EXTERN unsigned32 _TOD_Microseconds_per_tick; /* * The following contains the number of clock ticks per second. @@ -102,16 +102,16 @@ EXTERN unsigned32 _TOD_Microseconds_per_tick; * can be a source of error in the current time of day. */ -EXTERN unsigned32 _TOD_Ticks_per_second; +SCORE_EXTERN unsigned32 _TOD_Ticks_per_second; /* * This is the control structure for the watchdog timer which * fires to service the seconds chain. */ -EXTERN Watchdog_Control _TOD_Seconds_watchdog; +SCORE_EXTERN Watchdog_Control _TOD_Seconds_watchdog; -#ifdef INIT +#ifdef SCORE_INIT /* * The following array contains the number of days in all months. diff --git a/c/src/exec/score/include/rtems/score/userext.h b/c/src/exec/score/include/rtems/score/userext.h index 1a6ac3437e..5ef2b4e30e 100644 --- a/c/src/exec/score/include/rtems/score/userext.h +++ b/c/src/exec/score/include/rtems/score/userext.h @@ -100,13 +100,13 @@ typedef struct { * configured by the application. */ -EXTERN User_extensions_Control _User_extensions_Initial; +SCORE_EXTERN User_extensions_Control _User_extensions_Initial; /* * The following is used to manage the list of active extensions. */ -EXTERN Chain_Control _User_extensions_List; +SCORE_EXTERN Chain_Control _User_extensions_List; /* * _User_extensions_Thread_create diff --git a/c/src/exec/score/include/rtems/score/watchdog.h b/c/src/exec/score/include/rtems/score/watchdog.h index 9b13407c8e..8a43be1f1f 100644 --- a/c/src/exec/score/include/rtems/score/watchdog.h +++ b/c/src/exec/score/include/rtems/score/watchdog.h @@ -92,16 +92,16 @@ typedef struct { * during an insert on a watchdog delta chain. */ -EXTERN volatile unsigned32 _Watchdog_Sync_level; -EXTERN volatile unsigned32 _Watchdog_Sync_count; +SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_level; +SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_count; /* * The following defines the watchdog chains which are managed * on ticks and second boundaries. */ -EXTERN Chain_Control _Watchdog_Ticks_chain; -EXTERN Chain_Control _Watchdog_Seconds_chain; +SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain; +SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain; /* * _Watchdog_Handler_initialization diff --git a/c/src/exec/score/include/rtems/score/wkspace.h b/c/src/exec/score/include/rtems/score/wkspace.h index 9814a707b1..b351663ee5 100644 --- a/c/src/exec/score/include/rtems/score/wkspace.h +++ b/c/src/exec/score/include/rtems/score/wkspace.h @@ -30,7 +30,7 @@ extern "C" { * */ -EXTERN Heap_Control _Workspace_Area; /* executive heap header */ +SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */ /* * _Workspace_Handler_initialization diff --git a/c/src/exec/score/include/rtems/system.h b/c/src/exec/score/include/rtems/system.h index 9b50159c81..777a722588 100644 --- a/c/src/exec/score/include/rtems/system.h +++ b/c/src/exec/score/include/rtems/system.h @@ -36,16 +36,41 @@ extern "C" { /* * The following insures that all data is declared in the space - * of the Initialization Manager. It is referenced as "external" - * in every other file. + * of the initialization routine for either the Initialization Manager + * or the initialization file for the appropriate API. It is + * referenced as "external" in every other file. */ -#ifdef INIT -#undef EXTERN -#define EXTERN +#ifdef SCORE_INIT +#undef SCORE_EXTERN +#define SCORE_EXTERN #else -#undef EXTERN -#define EXTERN extern +#undef SCORE_EXTERN +#define SCORE_EXTERN extern +#endif + +#ifdef SAPI_INIT +#undef SAPI_EXTERN +#define SAPI_EXTERN +#else +#undef SAPI_EXTERN +#define SAPI_EXTERN extern +#endif + +#ifdef RTEMS_API_INIT +#undef RTEMS_EXTERN +#define RTEMS_EXTERN +#else +#undef RTEMS_EXTERN +#define RTEMS_EXTERN extern +#endif + +#ifdef POSIX_API_INIT +#undef POSIX_EXTERN +#define POSIX_EXTERN +#else +#undef POSIX_EXTERN +#define POSIX_EXTERN extern #endif /* @@ -118,7 +143,7 @@ extern const char _Copyright_Notice[]; /* RTEMS copyright string */ * The following defines the CPU dependent information table. */ -EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ +SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ /* * XXX weird RTEMS stuff diff --git a/cpukit/posix/include/rtems/posix/cond.h b/cpukit/posix/include/rtems/posix/cond.h index 4448e38b6c..137871e0dc 100644 --- a/cpukit/posix/include/rtems/posix/cond.h +++ b/cpukit/posix/include/rtems/posix/cond.h @@ -40,7 +40,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Condition_variables_Information; +POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; /* * _POSIX_Condition_variables_Manager_initialization diff --git a/cpukit/posix/include/rtems/posix/intr.h b/cpukit/posix/include/rtems/posix/intr.h index ae1690f676..68c336ac0a 100644 --- a/cpukit/posix/include/rtems/posix/intr.h +++ b/cpukit/posix/include/rtems/posix/intr.h @@ -53,14 +53,15 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; +POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; /* * The following is an array which is used to manage the set of * interrupt handlers installed on each vector. */ -EXTERN POSIX_Interrupt_Control _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; +POSIX_EXTERN POSIX_Interrupt_Control + _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; /* * _POSIX_Interrupt_Manager_initialization diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h index 0e690161b8..b552fec1d2 100644 --- a/cpukit/posix/include/rtems/posix/key.h +++ b/cpukit/posix/include/rtems/posix/key.h @@ -40,7 +40,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Keys_Information; +POSIX_EXTERN Objects_Information _POSIX_Keys_Information; /* * _POSIX_Keys_Manager_initialization diff --git a/cpukit/posix/include/rtems/posix/mqueue.h b/cpukit/posix/include/rtems/posix/mqueue.h index 5d5cfee61b..92691ce6dd 100644 --- a/cpukit/posix/include/rtems/posix/mqueue.h +++ b/cpukit/posix/include/rtems/posix/mqueue.h @@ -45,7 +45,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Message_queue_Information; +POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information; /* * _POSIX_Message_queue_Manager_initialization diff --git a/cpukit/posix/include/rtems/posix/mutex.h b/cpukit/posix/include/rtems/posix/mutex.h index 5639d908d2..0fb8ed6d5a 100644 --- a/cpukit/posix/include/rtems/posix/mutex.h +++ b/cpukit/posix/include/rtems/posix/mutex.h @@ -21,6 +21,9 @@ extern "C" { #endif +#include <rtems/score/coremutex.h> +#include <pthread.h> + /* * Data Structure used to manage a POSIX mutex */ @@ -36,7 +39,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Mutex_Information; +POSIX_EXTERN Objects_Information _POSIX_Mutex_Information; /* * _POSIX_Mutex_Manager_initialization diff --git a/cpukit/posix/include/rtems/posix/posixapi.h b/cpukit/posix/include/rtems/posix/posixapi.h new file mode 100644 index 0000000000..42c41da8c6 --- /dev/null +++ b/cpukit/posix/include/rtems/posix/posixapi.h @@ -0,0 +1,34 @@ +/* + * POSIX API Support + * + * NOTE: + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __POSIX_API_h +#define __POSIX_API_h + +#include <rtems/config.h> + +/*PAGE + * + * _POSIX_API_Initialize + * + * XXX + */ + +void _POSIX_API_Initialize( + rtems_configuration_table *configuration_table +); + +#endif +/* end of include file */ diff --git a/cpukit/posix/include/rtems/posix/pthread.h b/cpukit/posix/include/rtems/posix/pthread.h index 1ec9d9f193..9dca4705b7 100644 --- a/cpukit/posix/include/rtems/posix/pthread.h +++ b/cpukit/posix/include/rtems/posix/pthread.h @@ -35,15 +35,15 @@ typedef Thread_Control POSIX_Threads_Control; * this class of objects. */ -EXTERN Objects_Information _POSIX_Threads_Information; +POSIX_EXTERN Objects_Information _POSIX_Threads_Information; /* * These are used to manage the user initialization tasks. */ -EXTERN posix_initialization_tasks_table +POSIX_EXTERN posix_initialization_tasks_table *_POSIX_Threads_User_initialization_tasks; -EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_tasks; +POSIX_EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_tasks; /* diff --git a/cpukit/posix/include/rtems/posix/semaphore.h b/cpukit/posix/include/rtems/posix/semaphore.h index a538663989..b2334d8f66 100644 --- a/cpukit/posix/include/rtems/posix/semaphore.h +++ b/cpukit/posix/include/rtems/posix/semaphore.h @@ -41,7 +41,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _POSIX_Semaphore_Information; +POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; /* * _POSIX_Semaphore_Manager_initialization diff --git a/cpukit/rtems/include/rtems/rtems/dpmem.h b/cpukit/rtems/include/rtems/rtems/dpmem.h index fc580c1a8a..6f8893dd4b 100644 --- a/cpukit/rtems/include/rtems/rtems/dpmem.h +++ b/cpukit/rtems/include/rtems/rtems/dpmem.h @@ -51,7 +51,7 @@ typedef struct { * The following define the internal Dual Ported Memory information. */ -EXTERN Objects_Information _Dual_ported_memory_Information; +RTEMS_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 4cd3b1cbea..6cb9882da5 100644 --- a/cpukit/rtems/include/rtems/rtems/event.h +++ b/cpukit/rtems/include/rtems/rtems/event.h @@ -159,7 +159,7 @@ void _Event_Timeout ( * executing thread are received properly. */ -EXTERN volatile Event_Sync_states _Event_Sync_state; +RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state; #include <rtems/rtems/eventmp.h> #ifndef __RTEMS_APPLICATION__ diff --git a/cpukit/rtems/include/rtems/rtems/message.h b/cpukit/rtems/include/rtems/rtems/message.h index 0469f8ddbf..0f8fe9f1b1 100644 --- a/cpukit/rtems/include/rtems/rtems/message.h +++ b/cpukit/rtems/include/rtems/rtems/message.h @@ -68,7 +68,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Message_queue_Information; +RTEMS_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 e06a2e4b86..c3410da9b3 100644 --- a/cpukit/rtems/include/rtems/rtems/part.h +++ b/cpukit/rtems/include/rtems/rtems/part.h @@ -55,7 +55,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Partition_Information; +RTEMS_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 a85bbcdc09..85c17cf3eb 100644 --- a/cpukit/rtems/include/rtems/rtems/ratemon.h +++ b/cpukit/rtems/include/rtems/rtems/ratemon.h @@ -67,7 +67,7 @@ typedef struct { Thread_Control *owner; } Rate_monotonic_Control; -EXTERN Objects_Information _Rate_monotonic_Information; +RTEMS_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 7ee2658cd2..1683613087 100644 --- a/cpukit/rtems/include/rtems/rtems/region.h +++ b/cpukit/rtems/include/rtems/rtems/region.h @@ -59,7 +59,7 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Region_Information; +RTEMS_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 c4f8574b17..cb47ee3548 100644 --- a/cpukit/rtems/include/rtems/rtems/sem.h +++ b/cpukit/rtems/include/rtems/rtems/sem.h @@ -58,7 +58,7 @@ typedef struct { * this class of objects. */ -EXTERN Objects_Information _Semaphore_Information; +RTEMS_EXTERN Objects_Information _Semaphore_Information; /* * _Semaphore_Manager_initialization diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h index 23c1c830c6..ac9b9d1046 100644 --- a/cpukit/rtems/include/rtems/rtems/status.h +++ b/cpukit/rtems/include/rtems/rtems/status.h @@ -60,7 +60,7 @@ typedef enum { extern rtems_status_code _Status_Object_name_errors_to_status[]; -#ifdef INIT +#ifdef RTEMS_API_INIT rtems_status_code _Status_Object_name_errors_to_status[] = { RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */ RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */ diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h index 43f65dd5f3..dc30264635 100644 --- a/cpukit/rtems/include/rtems/rtems/tasks.h +++ b/cpukit/rtems/include/rtems/rtems/tasks.h @@ -164,14 +164,15 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _RTEMS_tasks_Information; +RTEMS_EXTERN Objects_Information _RTEMS_tasks_Information; /* * These are used to manage the user initialization tasks. */ -EXTERN rtems_initialization_tasks_table *_RTEMS_tasks_User_initialization_tasks; -EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks; +RTEMS_EXTERN rtems_initialization_tasks_table + *_RTEMS_tasks_User_initialization_tasks; +RTEMS_EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks; /* * _RTEMS_tasks_Manager_initialization diff --git a/cpukit/rtems/include/rtems/rtems/timer.h b/cpukit/rtems/include/rtems/rtems/timer.h index d09b80d5ff..197719c17b 100644 --- a/cpukit/rtems/include/rtems/rtems/timer.h +++ b/cpukit/rtems/include/rtems/rtems/timer.h @@ -64,7 +64,7 @@ typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )( * this class of objects. */ -EXTERN Objects_Information _Timer_Information; +RTEMS_EXTERN Objects_Information _Timer_Information; /* * The following records define the control block used to manage diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h index 7ff0f9f485..19a8edeb0f 100644 --- a/cpukit/sapi/include/rtems/config.h +++ b/cpukit/sapi/include/rtems/config.h @@ -84,7 +84,7 @@ typedef struct { rtems_extensions_table *User_extension_table; rtems_multiprocessing_table *User_multiprocessing_table; rtems_api_configuration_table *RTEMS_api_configuration; - posix_api_configuration_table *Posix_api_configuration; + posix_api_configuration_table *POSIX_api_configuration; } rtems_configuration_table; /* @@ -92,8 +92,8 @@ typedef struct { * the user. They are not used in RTEMS itself. */ -EXTERN rtems_configuration_table *_Configuration_Table; -EXTERN rtems_multiprocessing_table *_Configuration_MP_table; +SAPI_EXTERN rtems_configuration_table *_Configuration_Table; +SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table; #ifdef __cplusplus } diff --git a/cpukit/sapi/include/rtems/extension.h b/cpukit/sapi/include/rtems/extension.h index 8f46ed80dd..ed95339348 100644 --- a/cpukit/sapi/include/rtems/extension.h +++ b/cpukit/sapi/include/rtems/extension.h @@ -54,7 +54,7 @@ typedef User_extensions_Table rtems_extensions_table; * this class of objects. */ -EXTERN Objects_Information _Extension_Information; +SAPI_EXTERN Objects_Information _Extension_Information; /* * The following records define the control block used to manage diff --git a/cpukit/sapi/include/rtems/io.h b/cpukit/sapi/include/rtems/io.h index a7af4df792..01042ce762 100644 --- a/cpukit/sapi/include/rtems/io.h +++ b/cpukit/sapi/include/rtems/io.h @@ -86,10 +86,10 @@ typedef struct { * Address Table and Device Name Table. */ -EXTERN unsigned32 _IO_Number_of_drivers; -EXTERN rtems_driver_address_table *_IO_Driver_address_table; -EXTERN unsigned32 _IO_Number_of_devices; -EXTERN rtems_driver_name_t *_IO_Driver_name_table; +SAPI_EXTERN unsigned32 _IO_Number_of_drivers; +SAPI_EXTERN rtems_driver_address_table *_IO_Driver_address_table; +SAPI_EXTERN unsigned32 _IO_Number_of_devices; +SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table; /* * _IO_Manager_initialization diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index 9e9f0d2040..442465dda4 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -13,11 +13,12 @@ */ /* - * INIT is defined so all of the data will be included in this - * file. + * SCORE_INIT and SAPI_INIT are defined so all of the super core and + * super API data will be included in this object file. */ -#define INIT +#define SAPI_INIT +#define SCORE_INIT #include <rtems/system.h> #include <rtems/config.h> @@ -44,7 +45,11 @@ #include <rtems/directives.h> #include <rtems/sptables.h> + #include <rtems/rtems/rtemsapi.h> +#ifdef RTEMS_POSIX_API +#include <rtems/posix/posixapi.h> +#endif /*PAGE * diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c index 6efba79034..4ba236e42f 100644 --- a/cpukit/sapi/src/posixapi.c +++ b/cpukit/sapi/src/posixapi.c @@ -14,21 +14,27 @@ * $Id$ */ +#ifdef RTEMS_POSIX_API + #include <assert.h> -#include <rtems/system.h> +/* + * POSIX_API_INIT is defined so all of the POSIX API + * data will be included in this object file. + */ -#define INIT +#define POSIX_API_INIT +#include <rtems/system.h> + +#include <sys/types.h> +#include <rtems/config.h> #include <rtems/posix/cond.h> -#include <rtems/posix/condmp.h> #include <rtems/posix/config.h> #include <rtems/posix/key.h> #include <rtems/posix/mutex.h> -#include <rtems/posix/mutexmp.h> #include <rtems/posix/priority.h> #include <rtems/posix/pthread.h> -#include <rtems/posix/pthreadmp.h> #include <rtems/posix/time.h> /*PAGE @@ -48,20 +54,17 @@ void _POSIX_API_Initialize( assert( api_configuration ); - _RTEMS_tasks_Manager_initialization( - api_configuration->maximum_tasks -#if 0 -, + _POSIX_Threads_Manager_initialization( + api_configuration->maximum_threads, api_configuration->number_of_initialization_tasks, api_configuration->User_initialization_tasks_table -#endif ); _POSIX_Condition_variables_Manager_initialization( api_configuration->maximum_condition_variables ); - void _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); + _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); _POSIX_Mutex_Manager_initialization( api_configuration->maximum_mutexes @@ -69,4 +72,5 @@ void _POSIX_API_Initialize( } +#endif /* end of file */ diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c index 0d1229a277..fe27507f2a 100644 --- a/cpukit/sapi/src/rtemsapi.c +++ b/cpukit/sapi/src/rtemsapi.c @@ -14,12 +14,17 @@ * $Id$ */ +/* + * RTEMS_API_INIT is defined so all of the RTEMS API + * data will be included in this object file. + */ + +#define RTEMS_API_INIT + #include <rtems/system.h> #include <rtems/rtems/status.h> #include <rtems/rtems/rtemsapi.h> -#define INIT - #include <rtems/rtems/intr.h> #include <rtems/rtems/clock.h> #include <rtems/rtems/tasks.h> diff --git a/cpukit/score/include/rtems/debug.h b/cpukit/score/include/rtems/debug.h index afe6251bbe..c0cb20a7ea 100644 --- a/cpukit/score/include/rtems/debug.h +++ b/cpukit/score/include/rtems/debug.h @@ -40,7 +40,7 @@ typedef unsigned32 rtems_debug_control; * This variable contains the current debug level. */ -EXTERN rtems_debug_control _Debug_Level; +SCORE_EXTERN rtems_debug_control _Debug_Level; /* * _Debug_Manager_initialization diff --git a/cpukit/score/include/rtems/score/apiext.h b/cpukit/score/include/rtems/score/apiext.h index 44e7bc8dd3..f9556f540a 100644 --- a/cpukit/score/include/rtems/score/apiext.h +++ b/cpukit/score/include/rtems/score/apiext.h @@ -43,7 +43,7 @@ typedef struct { * This is the list of API extensions to the system initialization. */ -EXTERN Chain_Control _API_extensions_List; +SCORE_EXTERN Chain_Control _API_extensions_List; /* * _API_extensions_Initialization diff --git a/cpukit/score/include/rtems/score/bitfield.h b/cpukit/score/include/rtems/score/bitfield.h index 6dbf1e0ba0..3fda9b4904 100644 --- a/cpukit/score/include/rtems/score/bitfield.h +++ b/cpukit/score/include/rtems/score/bitfield.h @@ -40,8 +40,8 @@ extern "C" { #if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE ) -#ifndef INIT - extern const unsigned char __log2table[256]; +#ifndef SCORE_INIT +extern const unsigned char __log2table[256]; #else const unsigned char __log2table[256] = { 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, diff --git a/cpukit/score/include/rtems/score/context.h b/cpukit/score/include/rtems/score/context.h index 4cd1f1e4c5..bd5c3b7126 100644 --- a/cpukit/score/include/rtems/score/context.h +++ b/cpukit/score/include/rtems/score/context.h @@ -35,7 +35,7 @@ extern "C" { * currently executing thread and given to the heir thread. */ -EXTERN boolean _Context_Switch_necessary; +SCORE_EXTERN boolean _Context_Switch_necessary; /* * _Context_Initialize diff --git a/cpukit/score/include/rtems/score/copyrt.h b/cpukit/score/include/rtems/score/copyrt.h index c711ba09b3..a146206f01 100644 --- a/cpukit/score/include/rtems/score/copyrt.h +++ b/cpukit/score/include/rtems/score/copyrt.h @@ -21,7 +21,7 @@ extern "C" { #endif -#ifdef INIT +#ifdef SCORE_INIT const char _Copyright_Notice[] = "COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.\n\ diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h index c2e8365953..3d315473b0 100644 --- a/cpukit/score/include/rtems/score/interr.h +++ b/cpukit/score/include/rtems/score/interr.h @@ -70,7 +70,7 @@ typedef struct { * When a fatal error occurs, the error information is stored here. */ -EXTERN Internal_errors_Information Internal_errors_What_happened; +SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened; /* * _Internal_error_Occurred diff --git a/cpukit/score/include/rtems/score/isr.h b/cpukit/score/include/rtems/score/isr.h index cf8f4cad59..c24b81eb5b 100644 --- a/cpukit/score/include/rtems/score/isr.h +++ b/cpukit/score/include/rtems/score/isr.h @@ -68,21 +68,21 @@ typedef ISR_Handler ( *ISR_Handler_entry )( * executing thread by an ISR handler. */ -EXTERN boolean _ISR_Signals_to_thread_executing; +SCORE_EXTERN boolean _ISR_Signals_to_thread_executing; /* * The following contains the interrupt service routine nest level. * When this variable is zero, a thread is executing. */ -EXTERN unsigned32 _ISR_Nest_level; +SCORE_EXTERN unsigned32 _ISR_Nest_level; /* * The following declares the Vector Table. Application * interrupt service routines are vectored by the ISR Handler via this table. */ -EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; +SCORE_EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; /* * _ISR_Handler_initialization diff --git a/cpukit/score/include/rtems/score/mpci.h b/cpukit/score/include/rtems/score/mpci.h index 25d7ac4094..a2533866c1 100644 --- a/cpukit/score/include/rtems/score/mpci.h +++ b/cpukit/score/include/rtems/score/mpci.h @@ -127,33 +127,34 @@ typedef struct { * This is the core semaphore which the MPCI Receive Server blocks on. */ -EXTERN CORE_semaphore_Control _MPCI_Semaphore; +SCORE_EXTERN CORE_semaphore_Control _MPCI_Semaphore; /* * The following thread queue is used to maintain a list of tasks * which currently have outstanding remote requests. */ -EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; +SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; /* * The following define the internal pointers to the user's * configuration information. */ -EXTERN MPCI_Control *_MPCI_table; +SCORE_EXTERN MPCI_Control *_MPCI_table; /* * The following points to the MPCI Receive Server. */ -EXTERN Thread_Control *_MPCI_Receive_server_tcb; +SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb; /* * The following table contains the process packet routines provided * by each object that supports MP operations. */ -EXTERN MPCI_Packet_processor _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1]; +SCORE_EXTERN MPCI_Packet_processor + _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1]; /* * _MPCI_Handler_initialization diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index 2d1588cf01..edd186c607 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -151,8 +151,8 @@ typedef struct { * node number of the local node. */ -EXTERN unsigned32 _Objects_Local_node; -EXTERN unsigned32 _Objects_Maximum_nodes; +SCORE_EXTERN unsigned32 _Objects_Local_node; +SCORE_EXTERN unsigned32 _Objects_Maximum_nodes; /* * The following is the list of information blocks for each object @@ -160,7 +160,7 @@ EXTERN unsigned32 _Objects_Maximum_nodes; * and obtain a pointer to the appropriate object control block. */ -EXTERN Objects_Information +SCORE_EXTERN Objects_Information *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1]; /* diff --git a/cpukit/score/include/rtems/score/objectmp.h b/cpukit/score/include/rtems/score/objectmp.h index 96496656df..178b5d1c04 100644 --- a/cpukit/score/include/rtems/score/objectmp.h +++ b/cpukit/score/include/rtems/score/objectmp.h @@ -137,8 +137,8 @@ void _Objects_MP_Is_remote ( * inactive global object control blocks. */ -EXTERN unsigned32 _Objects_MP_Maximum_global_objects; -EXTERN Chain_Control _Objects_MP_Inactive_global_objects; +SCORE_EXTERN unsigned32 _Objects_MP_Maximum_global_objects; +SCORE_EXTERN Chain_Control _Objects_MP_Inactive_global_objects; #ifndef __RTEMS_APPLICATION__ #include <rtems/score/objectmp.inl> diff --git a/cpukit/score/include/rtems/score/priority.h b/cpukit/score/include/rtems/score/priority.h index b7de14f0f9..a17870d868 100644 --- a/cpukit/score/include/rtems/score/priority.h +++ b/cpukit/score/include/rtems/score/priority.h @@ -58,8 +58,9 @@ typedef struct { * threads are ready at that priority. */ -EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map; -EXTERN Priority_Bit_map_control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; +SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map; +SCORE_EXTERN Priority_Bit_map_control + _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; /* * The definition of the Priority_Bit_map_control type is CPU dependent. diff --git a/cpukit/score/include/rtems/score/sysstate.h b/cpukit/score/include/rtems/score/sysstate.h index d7e43b2356..1e38549db7 100644 --- a/cpukit/score/include/rtems/score/sysstate.h +++ b/cpukit/score/include/rtems/score/sysstate.h @@ -44,13 +44,13 @@ typedef enum { * an multiprocessing system. */ -EXTERN boolean _System_state_Is_multiprocessing; +SCORE_EXTERN boolean _System_state_Is_multiprocessing; /* * The following variable contains the current system state. */ -EXTERN System_state_Codes _System_state_Current; +SCORE_EXTERN System_state_Codes _System_state_Current; /* * Make it possible for the application to get the system state information. diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 74399545b9..a6c7591266 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -173,14 +173,14 @@ typedef struct { * manage this class of objects. */ -EXTERN Objects_Information _Thread_Internal_information; +SCORE_EXTERN Objects_Information _Thread_Internal_information; /* * The following define the thread control pointers used to access * and manipulate the idle thread. */ -EXTERN Thread_Control *_Thread_Idle; +SCORE_EXTERN Thread_Control *_Thread_Idle; /* * The following context area contains the context of the "thread" @@ -190,7 +190,7 @@ EXTERN Thread_Control *_Thread_Idle; * which initiated the system. */ -EXTERN Context_Control _Thread_BSP_context; +SCORE_EXTERN Context_Control _Thread_BSP_context; /* * The following declares the dispatch critical section nesting @@ -198,7 +198,7 @@ EXTERN Context_Control _Thread_BSP_context; * moments. */ -EXTERN unsigned32 _Thread_Dispatch_disable_level; +SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level; /* * The following holds how many user extensions are in the system. This @@ -206,28 +206,28 @@ EXTERN unsigned32 _Thread_Dispatch_disable_level; * per thread. */ -EXTERN unsigned32 _Thread_Maximum_extensions; +SCORE_EXTERN unsigned32 _Thread_Maximum_extensions; /* * The following data items are used to manage timeslicing. */ -EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice; -EXTERN unsigned32 _Thread_Ticks_per_timeslice; +SCORE_EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice; +SCORE_EXTERN unsigned32 _Thread_Ticks_per_timeslice; /* * The following points to the array of FIFOs used to manage the * set of ready threads. */ -EXTERN Chain_Control *_Thread_Ready_chain; +SCORE_EXTERN Chain_Control *_Thread_Ready_chain; /* * The following points to the thread which is currently executing. * This thread is implicitly manipulated by numerous directives. */ -EXTERN Thread_Control *_Thread_Executing; +SCORE_EXTERN Thread_Control *_Thread_Executing; /* * The following points to the highest priority ready thread @@ -236,14 +236,14 @@ EXTERN Thread_Control *_Thread_Executing; * dispatch occurs. */ -EXTERN Thread_Control *_Thread_Heir; +SCORE_EXTERN Thread_Control *_Thread_Heir; /* * The following points to the thread whose floating point * context is currently loaded. */ -EXTERN Thread_Control *_Thread_Allocated_fp; +SCORE_EXTERN Thread_Control *_Thread_Allocated_fp; /* * _Thread_Handler_initialization diff --git a/cpukit/score/include/rtems/score/threadmp.h b/cpukit/score/include/rtems/score/threadmp.h index 0466a04065..cd401e0ad8 100644 --- a/cpukit/score/include/rtems/score/threadmp.h +++ b/cpukit/score/include/rtems/score/threadmp.h @@ -68,14 +68,14 @@ Thread_Control *_Thread_MP_Find_proxy ( * blocking the multiprocessing receive thread. */ -EXTERN Thread_Control *_Thread_MP_Receive; +SCORE_EXTERN Thread_Control *_Thread_MP_Receive; /* * The following chains are used to manage proxies. */ -EXTERN Chain_Control _Thread_MP_Active_proxies; -EXTERN Chain_Control _Thread_MP_Inactive_proxies; +SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies; +SCORE_EXTERN Chain_Control _Thread_MP_Inactive_proxies; #ifndef __RTEMS_APPLICATION__ #include <rtems/score/threadmp.inl> diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h index 6a074daf16..bfcb108db9 100644 --- a/cpukit/score/include/rtems/score/threadq.h +++ b/cpukit/score/include/rtems/score/threadq.h @@ -52,7 +52,7 @@ typedef void ( *Thread_queue_Extract_callout )( Thread_Control * ); -EXTERN Thread_queue_Extract_callout +SCORE_EXTERN Thread_queue_Extract_callout _Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ]; /* diff --git a/cpukit/score/include/rtems/score/tod.h b/cpukit/score/include/rtems/score/tod.h index b0fb686014..3dd4e6d823 100644 --- a/cpukit/score/include/rtems/score/tod.h +++ b/cpukit/score/include/rtems/score/tod.h @@ -69,27 +69,27 @@ typedef struct { /* RTEID style time/date */ * The following contains the current time of day. */ -EXTERN TOD_Control _TOD_Current; +SCORE_EXTERN TOD_Control _TOD_Current; /* * The following contains the number of seconds from 00:00:00 * January 1, TOD_BASE_YEAR until the current time of day. */ -EXTERN Watchdog_Interval _TOD_Seconds_since_epoch; +SCORE_EXTERN Watchdog_Interval _TOD_Seconds_since_epoch; /* * The following contains the number of ticks since the * system was booted. */ -EXTERN Watchdog_Interval _TOD_Ticks_since_boot; +SCORE_EXTERN Watchdog_Interval _TOD_Ticks_since_boot; /* * The following contains the number of microseconds per tick. */ -EXTERN unsigned32 _TOD_Microseconds_per_tick; +SCORE_EXTERN unsigned32 _TOD_Microseconds_per_tick; /* * The following contains the number of clock ticks per second. @@ -102,16 +102,16 @@ EXTERN unsigned32 _TOD_Microseconds_per_tick; * can be a source of error in the current time of day. */ -EXTERN unsigned32 _TOD_Ticks_per_second; +SCORE_EXTERN unsigned32 _TOD_Ticks_per_second; /* * This is the control structure for the watchdog timer which * fires to service the seconds chain. */ -EXTERN Watchdog_Control _TOD_Seconds_watchdog; +SCORE_EXTERN Watchdog_Control _TOD_Seconds_watchdog; -#ifdef INIT +#ifdef SCORE_INIT /* * The following array contains the number of days in all months. diff --git a/cpukit/score/include/rtems/score/userext.h b/cpukit/score/include/rtems/score/userext.h index 1a6ac3437e..5ef2b4e30e 100644 --- a/cpukit/score/include/rtems/score/userext.h +++ b/cpukit/score/include/rtems/score/userext.h @@ -100,13 +100,13 @@ typedef struct { * configured by the application. */ -EXTERN User_extensions_Control _User_extensions_Initial; +SCORE_EXTERN User_extensions_Control _User_extensions_Initial; /* * The following is used to manage the list of active extensions. */ -EXTERN Chain_Control _User_extensions_List; +SCORE_EXTERN Chain_Control _User_extensions_List; /* * _User_extensions_Thread_create diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h index 9b13407c8e..8a43be1f1f 100644 --- a/cpukit/score/include/rtems/score/watchdog.h +++ b/cpukit/score/include/rtems/score/watchdog.h @@ -92,16 +92,16 @@ typedef struct { * during an insert on a watchdog delta chain. */ -EXTERN volatile unsigned32 _Watchdog_Sync_level; -EXTERN volatile unsigned32 _Watchdog_Sync_count; +SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_level; +SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_count; /* * The following defines the watchdog chains which are managed * on ticks and second boundaries. */ -EXTERN Chain_Control _Watchdog_Ticks_chain; -EXTERN Chain_Control _Watchdog_Seconds_chain; +SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain; +SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain; /* * _Watchdog_Handler_initialization diff --git a/cpukit/score/include/rtems/score/wkspace.h b/cpukit/score/include/rtems/score/wkspace.h index 9814a707b1..b351663ee5 100644 --- a/cpukit/score/include/rtems/score/wkspace.h +++ b/cpukit/score/include/rtems/score/wkspace.h @@ -30,7 +30,7 @@ extern "C" { * */ -EXTERN Heap_Control _Workspace_Area; /* executive heap header */ +SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */ /* * _Workspace_Handler_initialization diff --git a/cpukit/score/include/rtems/system.h b/cpukit/score/include/rtems/system.h index 9b50159c81..777a722588 100644 --- a/cpukit/score/include/rtems/system.h +++ b/cpukit/score/include/rtems/system.h @@ -36,16 +36,41 @@ extern "C" { /* * The following insures that all data is declared in the space - * of the Initialization Manager. It is referenced as "external" - * in every other file. + * of the initialization routine for either the Initialization Manager + * or the initialization file for the appropriate API. It is + * referenced as "external" in every other file. */ -#ifdef INIT -#undef EXTERN -#define EXTERN +#ifdef SCORE_INIT +#undef SCORE_EXTERN +#define SCORE_EXTERN #else -#undef EXTERN -#define EXTERN extern +#undef SCORE_EXTERN +#define SCORE_EXTERN extern +#endif + +#ifdef SAPI_INIT +#undef SAPI_EXTERN +#define SAPI_EXTERN +#else +#undef SAPI_EXTERN +#define SAPI_EXTERN extern +#endif + +#ifdef RTEMS_API_INIT +#undef RTEMS_EXTERN +#define RTEMS_EXTERN +#else +#undef RTEMS_EXTERN +#define RTEMS_EXTERN extern +#endif + +#ifdef POSIX_API_INIT +#undef POSIX_EXTERN +#define POSIX_EXTERN +#else +#undef POSIX_EXTERN +#define POSIX_EXTERN extern #endif /* @@ -118,7 +143,7 @@ extern const char _Copyright_Notice[]; /* RTEMS copyright string */ * The following defines the CPU dependent information table. */ -EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ +SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ /* * XXX weird RTEMS stuff |