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 /c/src/exec/score | |
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 '')
48 files changed, 204 insertions, 150 deletions
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 |