summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/interr.c5
-rw-r--r--cpukit/score/src/isr.c5
-rw-r--r--cpukit/score/src/mpci.c11
-rw-r--r--cpukit/score/src/objectinitializeinformation.c5
-rw-r--r--cpukit/score/src/objectmp.c6
-rw-r--r--cpukit/score/src/thread.c2
-rw-r--r--cpukit/score/src/threaddispatch.c10
-rw-r--r--cpukit/score/src/threadhandler.c2
-rw-r--r--cpukit/score/src/threadmp.c2
-rw-r--r--cpukit/score/src/threadqenqueue.c5
-rw-r--r--cpukit/score/src/threadrestart.c2
-rw-r--r--cpukit/score/src/wkspace.c4
12 files changed, 24 insertions, 35 deletions
diff --git a/cpukit/score/src/interr.c b/cpukit/score/src/interr.c
index 5993eb9ffc..3a74f95cee 100644
--- a/cpukit/score/src/interr.c
+++ b/cpukit/score/src/interr.c
@@ -46,3 +46,8 @@ void _Terminate(
/* will not return from this routine */
while (true);
}
+
+void _Internal_error( Internal_errors_Core_list core_error )
+{
+ _Terminate( INTERNAL_ERROR_CORE, core_error );
+}
diff --git a/cpukit/score/src/isr.c b/cpukit/score/src/isr.c
index aaa05137b7..1078ef6f63 100644
--- a/cpukit/score/src/isr.c
+++ b/cpukit/score/src/isr.c
@@ -49,10 +49,7 @@ void _ISR_Handler_initialization( void )
uint32_t cpu_index;
if ( !_Stack_Is_enough( stack_size ) )
- _Terminate(
- INTERNAL_ERROR_CORE,
- INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
- );
+ _Internal_error( INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL );
for ( cpu_index = 0 ; cpu_index < cpu_max; ++cpu_index ) {
Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index e495eb455d..89651b93b6 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -95,7 +95,7 @@ static void _MPCI_Handler_initialization( void )
users_mpci_table = _Configuration_MP_table->User_mpci_table;
if ( _System_state_Is_multiprocessing && !users_mpci_table )
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_NO_MPCI );
+ _Internal_error( INTERNAL_ERROR_NO_MPCI );
_MPCI_table = users_mpci_table;
@@ -187,7 +187,7 @@ MP_packet_Prefix *_MPCI_Get_packet ( void )
(*_MPCI_table->get_packet)( &the_packet );
if ( the_packet == NULL )
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_OUT_OF_PACKETS );
+ _Internal_error( INTERNAL_ERROR_OUT_OF_PACKETS );
/*
* Put in a default timeout that will be used for
@@ -367,7 +367,7 @@ void _MPCI_Receive_server(
the_function = _MPCI_Packet_processors[ the_packet->the_class ];
if ( !the_function )
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_BAD_PACKET );
+ _Internal_error( INTERNAL_ERROR_BAD_PACKET );
(*the_function)( the_packet );
}
@@ -449,10 +449,7 @@ void _MPCI_Internal_packets_Process_packet (
_MPCI_Return_packet( the_packet_prefix );
- _Terminate(
- INTERNAL_ERROR_CORE,
- INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION
- );
+ _Internal_error( INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION );
}
_MPCI_Return_packet( the_packet_prefix );
diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c
index 92a561a830..8b1b88db07 100644
--- a/cpukit/score/src/objectinitializeinformation.c
+++ b/cpukit/score/src/objectinitializeinformation.c
@@ -74,10 +74,7 @@ void _Objects_Do_initialize_information(
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
- _Terminate(
- INTERNAL_ERROR_CORE,
- INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
- );
+ _Internal_error( INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0 );
}
/*
diff --git a/cpukit/score/src/objectmp.c b/cpukit/score/src/objectmp.c
index 4e6a838b0f..75a0fdb15f 100644
--- a/cpukit/score/src/objectmp.c
+++ b/cpukit/score/src/objectmp.c
@@ -165,7 +165,7 @@ void _Objects_MP_Handler_early_initialization(void)
maximum_nodes = _Configuration_MP_table->maximum_nodes;
if ( node < 1 || node > maximum_nodes )
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_INVALID_NODE );
+ _Internal_error( INTERNAL_ERROR_INVALID_NODE );
_Objects_Local_node = node;
_Objects_Maximum_nodes = maximum_nodes;
@@ -242,7 +242,7 @@ bool _Objects_MP_Allocate_and_open (
if ( is_fatal_error == false )
return false;
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS );
+ _Internal_error( INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS );
}
_Objects_MP_Open( information, the_global_object, the_name, the_id );
@@ -282,7 +282,7 @@ void _Objects_MP_Close (
} else {
_Objects_MP_Global_release( &lock_context );
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_INVALID_GLOBAL_ID );
+ _Internal_error( INTERNAL_ERROR_INVALID_GLOBAL_ID );
}
}
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 1fcc639da0..70bcccf70e 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -84,7 +84,7 @@ void _Thread_Handler_initialization(void)
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_BAD_STACK_HOOK );
+ _Internal_error( INTERNAL_ERROR_BAD_STACK_HOOK );
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 6bce046d10..5fe0843e49 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -154,10 +154,7 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level )
&& rtems_configuration_is_smp_enabled()
#endif
) {
- _Terminate(
- INTERNAL_ERROR_CORE,
- INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT
- );
+ _Internal_error( INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT );
}
#endif
@@ -238,10 +235,7 @@ void _Thread_Dispatch_direct( Per_CPU_Control *cpu_self )
ISR_Level level;
if ( cpu_self->thread_dispatch_disable_level != 1 ) {
- _Terminate(
- INTERNAL_ERROR_CORE,
- INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL
- );
+ _Internal_error( INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL );
}
_ISR_Local_disable( level );
diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
index 721dcf410b..7267577baf 100644
--- a/cpukit/score/src/threadhandler.c
+++ b/cpukit/score/src/threadhandler.c
@@ -96,5 +96,5 @@ void _Thread_Handler( void )
_User_extensions_Thread_exitted( executing );
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_THREAD_EXITTED );
+ _Internal_error( INTERNAL_ERROR_THREAD_EXITTED );
}
diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c
index 59f393f23c..4868e8fe4e 100644
--- a/cpukit/score/src/threadmp.c
+++ b/cpukit/score/src/threadmp.c
@@ -173,7 +173,7 @@ Thread_Control *_Thread_MP_Allocate_proxy (
_Thread_MP_Proxies_release( &lock_context );
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_OUT_OF_PROXIES );
+ _Internal_error( INTERNAL_ERROR_OUT_OF_PROXIES );
/*
* NOTE: The following return ensures that the compiler will
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index a96fbfcacc..bf08d78b41 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -372,7 +372,7 @@ void _Thread_queue_Deadlock_status( Thread_Control *the_thread )
void _Thread_queue_Deadlock_fatal( Thread_Control *the_thread )
{
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK );
+ _Internal_error( INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK );
}
static void _Thread_queue_Timeout(
@@ -519,8 +519,7 @@ Status_Control _Thread_queue_Enqueue_sticky(
_Thread_queue_Queue_release( queue, &queue_context->Lock_context.Lock_context );
if ( cpu_self->thread_dispatch_disable_level != 1 ) {
- _Terminate(
- INTERNAL_ERROR_CORE,
+ _Internal_error(
INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE
);
}
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index 4295bc46c2..5938dcfecf 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -136,7 +136,7 @@ static void _Thread_Make_zombie( Thread_Control *the_thread )
{
#if defined(RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT)
if ( _Thread_Owns_resources( the_thread ) ) {
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_RESOURCE_IN_USE );
+ _Internal_error( INTERNAL_ERROR_RESOURCE_IN_USE );
}
#endif
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index ae48e4482a..13dfc03706 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -134,7 +134,7 @@ void _Workspace_Handler_initialization(
}
if ( remaining > 0 ) {
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE );
+ _Internal_error( INTERNAL_ERROR_TOO_LITTLE_WORKSPACE );
}
_Heap_Protection_set_delayed_free_fraction( &_Workspace_Area, 1 );
@@ -200,7 +200,7 @@ void *_Workspace_Allocate_or_fatal_error(
#endif
if ( memory == NULL )
- _Terminate( INTERNAL_ERROR_CORE, INTERNAL_ERROR_WORKSPACE_ALLOCATION );
+ _Internal_error( INTERNAL_ERROR_WORKSPACE_ALLOCATION );
return memory;
}