[PATCH 2/9] Add INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Dec 9 08:45:30 UTC 2016
Update #2825.
---
cpukit/rtems/src/taskinitusers.c | 8 ++++++--
cpukit/sapi/src/interrtext.c | 3 ++-
cpukit/score/include/rtems/score/interr.h | 3 ++-
testsuites/sptests/spfatal01/testcase.h | 4 ++--
testsuites/sptests/spinternalerror02/init.c | 2 +-
5 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
index 5104639..4a851d4 100644
--- a/cpukit/rtems/src/taskinitusers.c
+++ b/cpukit/rtems/src/taskinitusers.c
@@ -88,8 +88,12 @@ void _RTEMS_tasks_Initialize_user_tasks_body( void )
user_tasks[ index ].attribute_set,
&id
);
- if ( !rtems_is_status_successful( return_value ) )
- _Terminate( INTERNAL_ERROR_RTEMS_API, return_value );
+ if ( !rtems_is_status_successful( return_value ) ) {
+ _Terminate(
+ INTERNAL_ERROR_CORE,
+ INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED
+ );
+ }
entry_point = user_tasks[ index ].entry_point;
if ( entry_point == NULL ) {
diff --git a/cpukit/sapi/src/interrtext.c b/cpukit/sapi/src/interrtext.c
index 860513b..55b79d1 100644
--- a/cpukit/sapi/src/interrtext.c
+++ b/cpukit/sapi/src/interrtext.c
@@ -58,7 +58,8 @@ static const char *const internal_error_text[] = {
"INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK",
"INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE",
"INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL",
- "INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT"
+ "INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT",
+ "INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED"
};
const char *rtems_internal_error_text( rtems_fatal_code error )
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index b030a22..cd72dea 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -171,7 +171,8 @@ typedef enum {
INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK = 28,
INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE = 29,
INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL = 30,
- INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT = 31
+ INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT = 31,
+ INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED = 32
} Internal_errors_Core_list;
typedef CPU_Uint32ptr Internal_errors_t;
diff --git a/testsuites/sptests/spfatal01/testcase.h b/testsuites/sptests/spfatal01/testcase.h
index 01710dc..19cd16e 100644
--- a/testsuites/sptests/spfatal01/testcase.h
+++ b/testsuites/sptests/spfatal01/testcase.h
@@ -24,8 +24,8 @@ rtems_initialization_tasks_table Initialization_tasks[] = {
#define FATAL_ERROR_TEST_NAME "1"
#define FATAL_ERROR_DESCRIPTION "Classic API Init task create failure"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR RTEMS_UNSATISFIED
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED
void force_error()
{
diff --git a/testsuites/sptests/spinternalerror02/init.c b/testsuites/sptests/spinternalerror02/init.c
index 8c1ab36..5bea4f1 100644
--- a/testsuites/sptests/spinternalerror02/init.c
+++ b/testsuites/sptests/spinternalerror02/init.c
@@ -36,7 +36,7 @@ static void test_internal_error_text(void)
} while ( text != text_last );
rtems_test_assert(
- error - 3 == INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT
+ error - 3 == INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED
);
}
--
1.8.4.5
More information about the devel
mailing list