[rtems commit] Add INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED
Sebastian Huber
sebh at rtems.org
Mon Dec 12 07:05:42 UTC 2016
Module: rtems
Branch: master
Commit: 9622f7796f782a03d0c18261e21d0353880960cf
Changeset: http://git.rtems.org/rtems/commit/?id=9622f7796f782a03d0c18261e21d0353880960cf
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Dec 9 08:44:49 2016 +0100
Add INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED
Update #2825.
---
cpukit/libcsupport/src/libio_init.c | 5 +++--
cpukit/sapi/src/interrtext.c | 3 ++-
cpukit/score/include/rtems/score/interr.h | 3 ++-
testsuites/sptests/spinternalerror02/init.c | 2 +-
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/cpukit/libcsupport/src/libio_init.c b/cpukit/libcsupport/src/libio_init.c
index a265290..3fa9e09 100644
--- a/cpukit/libcsupport/src/libio_init.c
+++ b/cpukit/libcsupport/src/libio_init.c
@@ -79,8 +79,9 @@ static void rtems_libio_init( void )
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
- if ( rc != RTEMS_SUCCESSFUL )
- rtems_fatal_error_occurred( rc );
+ if ( rc != RTEMS_SUCCESSFUL ) {
+ _Internal_error( INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED );
+ }
}
RTEMS_SYSINIT_ITEM(
diff --git a/cpukit/sapi/src/interrtext.c b/cpukit/sapi/src/interrtext.c
index 916d582..2285cd3 100644
--- a/cpukit/sapi/src/interrtext.c
+++ b/cpukit/sapi/src/interrtext.c
@@ -61,7 +61,8 @@ static const char *const internal_error_text[] = {
"INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT",
"INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED",
"INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED",
- "INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED"
+ "INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED",
+ "INTERNAL_ERROR_LIBIO_SEM_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 3bcece0..d6a961e 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -174,7 +174,8 @@ typedef enum {
INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT = 31,
INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED = 32,
INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED = 33,
- INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED = 34
+ INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED = 34,
+ INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED = 35
} Internal_errors_Core_list;
typedef CPU_Uint32ptr Internal_errors_t;
diff --git a/testsuites/sptests/spinternalerror02/init.c b/testsuites/sptests/spinternalerror02/init.c
index 1d24863..69bc89f 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_LIBIO_USER_ENV_KEY_CREATE_FAILED
+ error - 3 == INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED
);
}
More information about the vc
mailing list