forked from Imagelibrary/rtems
score: Rename _Internal_error_Occurred()
Rename _Internal_error_Occurred() into _Terminate().
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 );
|
||||
|
||||
/***************************************************************
|
||||
***************************************************************
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
@@ -31,5 +31,5 @@ void rtems_fatal(
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
_Internal_error_Occurred( source, false, error );
|
||||
_Terminate( source, false, error );
|
||||
}
|
||||
|
||||
@@ -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 ];
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user