[PATCH 1/4] score: Rename _Internal_error_Occurred()
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Feb 19 13:42:25 UTC 2014
Rename _Internal_error_Occurred() into _Terminate().
---
cpukit/libcsupport/src/gxx_wrappers.c | 4 ++--
cpukit/libcsupport/src/malloc_initialize.c | 2 +-
cpukit/rtems/src/taskinitusers.c | 4 ++--
cpukit/sapi/include/rtems/fatal.h | 4 ++--
cpukit/sapi/src/exshutdown.c | 2 +-
cpukit/sapi/src/fatal.c | 2 +-
cpukit/sapi/src/fatal2.c | 2 +-
cpukit/sapi/src/posixapi.c | 2 +-
cpukit/score/cpu/nios2/nios2-context-initialize.c | 2 +-
cpukit/score/cpu/nios2/nios2-isr-get-level.c | 2 +-
cpukit/score/cpu/nios2/nios2-isr-set-level.c | 2 +-
cpukit/score/cpu/powerpc/ppc-isr-vector-install.c | 2 +-
cpukit/score/include/rtems/score/basedefs.h | 2 +-
cpukit/score/include/rtems/score/coremuteximpl.h | 2 +-
cpukit/score/include/rtems/score/interr.h | 2 +-
cpukit/score/include/rtems/score/userext.h | 2 +-
cpukit/score/src/heap.c | 2 +-
cpukit/score/src/interr.c | 2 +-
cpukit/score/src/isr.c | 2 +-
cpukit/score/src/mpci.c | 8 ++++----
cpukit/score/src/objectinitializeinformation.c | 2 +-
cpukit/score/src/objectmp.c | 6 +++---
cpukit/score/src/thread.c | 2 +-
cpukit/score/src/threadblockingoperationcancel.c | 2 +-
cpukit/score/src/threadhandler.c | 2 +-
cpukit/score/src/threadmp.c | 2 +-
cpukit/score/src/wkspace.c | 4 ++--
testsuites/sptests/spinternalerror01/init.c | 2 +-
.../spinternalerror01/spinternalerror01.doc | 4 ++--
29 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/cpukit/libcsupport/src/gxx_wrappers.c b/cpukit/libcsupport/src/gxx_wrappers.c
index cd1ecc6..31f6254 100644
--- a/cpukit/libcsupport/src/gxx_wrappers.c
+++ b/cpukit/libcsupport/src/gxx_wrappers.c
@@ -133,7 +133,7 @@ void *rtems_gxx_getspecific(__gthread_key_t key)
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status != RTEMS_SUCCESSFUL ) {
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_GXX_KEY_ADD_FAILED
@@ -204,7 +204,7 @@ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
status
);
#endif
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
diff --git a/cpukit/libcsupport/src/malloc_initialize.c b/cpukit/libcsupport/src/malloc_initialize.c
index 06263bd..1fbc48a 100644
--- a/cpukit/libcsupport/src/malloc_initialize.c
+++ b/cpukit/libcsupport/src/malloc_initialize.c
@@ -52,7 +52,7 @@ void RTEMS_Malloc_Initialize(
}
if ( init_or_extend == _Heap_Initialize ) {
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
index a86a2ff..7ad0e75 100644
--- a/cpukit/rtems/src/taskinitusers.c
+++ b/cpukit/rtems/src/taskinitusers.c
@@ -74,7 +74,7 @@ void _RTEMS_tasks_Initialize_user_tasks_body( void )
&id
);
if ( !rtems_is_status_successful( return_value ) )
- _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
+ _Terminate( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
id,
@@ -82,6 +82,6 @@ void _RTEMS_tasks_Initialize_user_tasks_body( void )
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
- _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
+ _Terminate( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
diff --git a/cpukit/sapi/include/rtems/fatal.h b/cpukit/sapi/include/rtems/fatal.h
index 1230182..cd15f8d 100644
--- a/cpukit/sapi/include/rtems/fatal.h
+++ b/cpukit/sapi/include/rtems/fatal.h
@@ -66,7 +66,7 @@ static inline void rtems_exception_frame_print(
*
* @param[in] the_error is a 32-bit fatal error code.
*
- * @see _Internal_error_Occurred().
+ * @see _Terminate().
*/
void rtems_fatal_error_occurred(
uint32_t the_error
@@ -78,7 +78,7 @@ void rtems_fatal_error_occurred(
* @param[in] source is the fatal source.
* @param[in] error is the fatal code.
*
- * @see _Internal_error_Occurred().
+ * @see _Terminate().
*/
void rtems_fatal(
rtems_fatal_source source,
diff --git a/cpukit/sapi/src/exshutdown.c b/cpukit/sapi/src/exshutdown.c
index 8b0b149..b45eac6 100644
--- a/cpukit/sapi/src/exshutdown.c
+++ b/cpukit/sapi/src/exshutdown.c
@@ -18,7 +18,7 @@
void rtems_shutdown_executive( uint32_t result )
{
- _Internal_error_Occurred( RTEMS_FATAL_SOURCE_EXIT, false, result );
+ _Terminate( RTEMS_FATAL_SOURCE_EXIT, false, result );
/***************************************************************
***************************************************************
diff --git a/cpukit/sapi/src/fatal.c b/cpukit/sapi/src/fatal.c
index 9dc27fa..7c03894 100644
--- a/cpukit/sapi/src/fatal.c
+++ b/cpukit/sapi/src/fatal.c
@@ -30,7 +30,7 @@ void rtems_fatal_error_occurred(
uint32_t the_error
)
{
- _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, FALSE, the_error );
+ _Terminate( INTERNAL_ERROR_RTEMS_API, FALSE, the_error );
/* will not return from this routine */
}
diff --git a/cpukit/sapi/src/fatal2.c b/cpukit/sapi/src/fatal2.c
index 0c895b8..466e5b5 100644
--- a/cpukit/sapi/src/fatal2.c
+++ b/cpukit/sapi/src/fatal2.c
@@ -31,5 +31,5 @@ void rtems_fatal(
rtems_fatal_code error
)
{
- _Internal_error_Occurred( source, false, error );
+ _Terminate( source, false, error );
}
diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
index 5254225..bcf807e 100644
--- a/cpukit/sapi/src/posixapi.c
+++ b/cpukit/sapi/src/posixapi.c
@@ -48,7 +48,7 @@ void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
{
uint32_t code = ( domain << 8 ) | ( ( uint32_t ) eno & 0xffU );
- _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, false, code );
+ _Terminate( INTERNAL_ERROR_POSIX_API, false, code );
}
Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ];
diff --git a/cpukit/score/cpu/nios2/nios2-context-initialize.c b/cpukit/score/cpu/nios2/nios2-context-initialize.c
index 6b884d0..4a7c174 100644
--- a/cpukit/score/cpu/nios2/nios2-context-initialize.c
+++ b/cpukit/score/cpu/nios2/nios2-context-initialize.c
@@ -62,7 +62,7 @@ void _CPU_Context_Initialize(
if ( !ok ) {
/* The task stack allocator must ensure that the stack area is valid */
- _Internal_error_Occurred( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
+ _Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
}
}
}
diff --git a/cpukit/score/cpu/nios2/nios2-isr-get-level.c b/cpukit/score/cpu/nios2/nios2-isr-get-level.c
index f6a51cd..75d51d5 100644
--- a/cpukit/score/cpu/nios2/nios2-isr-get-level.c
+++ b/cpukit/score/cpu/nios2/nios2-isr-get-level.c
@@ -36,7 +36,7 @@ uint32_t _CPU_ISR_Get_level( void )
break;
default:
/* FIXME */
- _Internal_error_Occurred( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
+ _Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
break;
}
diff --git a/cpukit/score/cpu/nios2/nios2-isr-set-level.c b/cpukit/score/cpu/nios2/nios2-isr-set-level.c
index a753a4f..a9afe2c 100644
--- a/cpukit/score/cpu/nios2/nios2-isr-set-level.c
+++ b/cpukit/score/cpu/nios2/nios2-isr-set-level.c
@@ -48,7 +48,7 @@ uint32_t _Nios2_ISR_Set_level( uint32_t new_level, uint32_t status )
break;
default:
/* FIXME */
- _Internal_error_Occurred( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
+ _Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
break;
}
diff --git a/cpukit/score/cpu/powerpc/ppc-isr-vector-install.c b/cpukit/score/cpu/powerpc/ppc-isr-vector-install.c
index 98eff81..3a4e456 100644
--- a/cpukit/score/cpu/powerpc/ppc-isr-vector-install.c
+++ b/cpukit/score/cpu/powerpc/ppc-isr-vector-install.c
@@ -31,7 +31,7 @@ void _CPU_ISR_install_vector(
proc_ptr *old_handler
)
{
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index c8b4960..0b4e9ac 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -151,7 +151,7 @@
* the method will NOT return to the caller. This can assist the
* compiler in code generation and avoid unreachable paths. This
* can impact the code generated following calls to
- * rtems_fatal_error_occurred and _Internal_error_Occurred.
+ * rtems_fatal_error_occurred and _Terminate.
*/
#ifdef __GNUC__
#define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h
index d8e8bef..d9006ad 100644
--- a/cpukit/score/include/rtems/score/coremuteximpl.h
+++ b/cpukit/score/include/rtems/score/coremuteximpl.h
@@ -258,7 +258,7 @@ RTEMS_INLINE_ROUTINE void _CORE_mutex_Seize_body(
)
{
if ( _CORE_mutex_Check_dispatch_for_seize( wait ) ) {
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
false,
INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index 197f648..7dcbfba 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -210,7 +210,7 @@ extern Internal_errors_Information _Internal_errors_What_happened;
*
* @see rtems_fatal_error_occurred() and rtems_fatal().
*/
-void _Internal_error_Occurred(
+void _Terminate(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
diff --git a/cpukit/score/include/rtems/score/userext.h b/cpukit/score/include/rtems/score/userext.h
index bf76c35..deae385 100644
--- a/cpukit/score/include/rtems/score/userext.h
+++ b/cpukit/score/include/rtems/score/userext.h
@@ -181,7 +181,7 @@ typedef void( *User_extensions_thread_exitted_extension )(
/**
* @brief Fatal error extension.
*
- * It corresponds to _Internal_error_Occurred() (used by the
+ * It corresponds to _Terminate() (used by the
* rtems_fatal_error_occurred() directive). The first parameter contains the
* error source. The second parameter indicates if it was an internal error.
* The third parameter contains the error code.
diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c
index 8312d41..b13254e 100644
--- a/cpukit/score/src/heap.c
+++ b/cpukit/score/src/heap.c
@@ -159,7 +159,7 @@ static uint32_t instance = 0;
)
{
/* FIXME */
- _Internal_error_Occurred( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
+ _Terminate( INTERNAL_ERROR_CORE, false, 0xdeadbeef );
}
#endif
diff --git a/cpukit/score/src/interr.c b/cpukit/score/src/interr.c
index 3836f52..c2a9fbe 100644
--- a/cpukit/score/src/interr.c
+++ b/cpukit/score/src/interr.c
@@ -28,7 +28,7 @@ System_state_Codes _System_state_Current;
Internal_errors_Information _Internal_errors_What_happened;
-void _Internal_error_Occurred(
+void _Terminate(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
diff --git a/cpukit/score/src/isr.c b/cpukit/score/src/isr.c
index 0b0cbe9..0cea48e 100644
--- a/cpukit/score/src/isr.c
+++ b/cpukit/score/src/isr.c
@@ -45,7 +45,7 @@ void _ISR_Handler_initialization( void )
uint32_t cpu;
if ( !_Stack_Is_enough( stack_size ) )
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index bc28994..93ca1f4 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -47,7 +47,7 @@ void _MPCI_Handler_initialization(
users_mpci_table = _Configuration_MP_table->User_mpci_table;
if ( _System_state_Is_multiprocessing && !users_mpci_table )
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_NO_MPCI
@@ -149,7 +149,7 @@ MP_packet_Prefix *_MPCI_Get_packet ( void )
(*_MPCI_table->get_packet)( &the_packet );
if ( the_packet == NULL )
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_OUT_OF_PACKETS
@@ -316,7 +316,7 @@ Thread _MPCI_Receive_server(
the_function = _MPCI_Packet_processors[ the_packet->the_class ];
if ( !the_function )
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_PACKET
@@ -398,7 +398,7 @@ void _MPCI_Internal_packets_Process_packet (
_MPCI_Return_packet( the_packet_prefix );
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION
diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c
index a791bd7..6a09e09 100644
--- a/cpukit/score/src/objectinitializeinformation.c
+++ b/cpukit/score/src/objectinitializeinformation.c
@@ -78,7 +78,7 @@ void _Objects_Initialize_information(
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
diff --git a/cpukit/score/src/objectmp.c b/cpukit/score/src/objectmp.c
index 12daae6..b6a7c44 100644
--- a/cpukit/score/src/objectmp.c
+++ b/cpukit/score/src/objectmp.c
@@ -33,7 +33,7 @@ void _Objects_MP_Handler_early_initialization(void)
maximum_nodes = _Configuration_MP_table->maximum_nodes;
if ( node < 1 || node > maximum_nodes )
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INVALID_NODE
@@ -105,7 +105,7 @@ bool _Objects_MP_Allocate_and_open (
if ( is_fatal_error == false )
return false;
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS
@@ -144,7 +144,7 @@ void _Objects_MP_Close (
}
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INVALID_GLOBAL_ID
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 5587ac3..c680f69 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -36,7 +36,7 @@ void _Thread_Handler_initialization(void)
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
diff --git a/cpukit/score/src/threadblockingoperationcancel.c b/cpukit/score/src/threadblockingoperationcancel.c
index 70bdb3d..cb852b2 100644
--- a/cpukit/score/src/threadblockingoperationcancel.c
+++ b/cpukit/score/src/threadblockingoperationcancel.c
@@ -51,7 +51,7 @@ void _Thread_blocking_operation_Cancel(
#if defined(RTEMS_DEBUG)
if ( (sync_state == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
(sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL
diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
index 80941f8..4ecc789 100644
--- a/cpukit/score/src/threadhandler.c
+++ b/cpukit/score/src/threadhandler.c
@@ -223,7 +223,7 @@ void _Thread_Handler( void )
_User_extensions_Thread_exitted( executing );
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_THREAD_EXITTED
diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c
index 1ab899b..64d30fd 100644
--- a/cpukit/score/src/threadmp.c
+++ b/cpukit/score/src/threadmp.c
@@ -77,7 +77,7 @@ Thread_Control *_Thread_MP_Allocate_proxy (
return the_thread;
}
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_OUT_OF_PROXIES
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index f437b88..8068c63 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -117,7 +117,7 @@ void _Workspace_Handler_initialization(
}
if ( remaining > 0 ) {
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
@@ -185,7 +185,7 @@ void *_Workspace_Allocate_or_fatal_error(
#endif
if ( memory == NULL )
- _Internal_error_Occurred(
+ _Terminate(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION
diff --git a/testsuites/sptests/spinternalerror01/init.c b/testsuites/sptests/spinternalerror01/init.c
index 8962410..92b4241 100644
--- a/testsuites/sptests/spinternalerror01/init.c
+++ b/testsuites/sptests/spinternalerror01/init.c
@@ -27,7 +27,7 @@
void boot_card( const char *cmdline )
{
- _Internal_error_Occurred( FATAL_SOURCE, FATAL_IS_INTERNAL, FATAL_ERROR );
+ _Terminate( FATAL_SOURCE, FATAL_IS_INTERNAL, FATAL_ERROR );
}
static void fatal_extension(
diff --git a/testsuites/sptests/spinternalerror01/spinternalerror01.doc b/testsuites/sptests/spinternalerror01/spinternalerror01.doc
index a37c5b0..d065036 100644
--- a/testsuites/sptests/spinternalerror01/spinternalerror01.doc
+++ b/testsuites/sptests/spinternalerror01/spinternalerror01.doc
@@ -4,8 +4,8 @@ test set name: spinternalerror01
directives:
- _Internal_error_Occurred()
+ - _Terminate()
concepts:
- - Ensure that _Internal_error_Occurred() works right after low-level start.
+ - Ensure that _Terminate() works right after low-level start.
--
1.7.7
More information about the devel
mailing list