[rtems commit] INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL
Sebastian Huber
sebh at rtems.org
Wed Nov 22 12:02:00 UTC 2017
Module: rtems
Branch: master
Commit: cd3e2204c74f032f8088f0426ed2a3732bdedf8d
Changeset: http://git.rtems.org/rtems/commit/?id=cd3e2204c74f032f8088f0426ed2a3732bdedf8d
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Nov 20 06:30:26 2017 +0100
INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL
Delete superfluous INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL.
Update #3243.
---
cpukit/posix/src/pthreadinitthreads.c | 8 +-------
cpukit/score/include/rtems/score/interr.h | 2 +-
testsuites/psxtests/psxfatal01/testcase.h | 2 +-
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index 1777ec9..15c6b9f 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -40,7 +40,6 @@ void _POSIX_Threads_Initialize_user_threads_body(void)
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
- void *(*thread_entry)(void *);
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
maximum = Configuration_POSIX_API.number_of_initialization_threads;
@@ -66,15 +65,10 @@ void _POSIX_Threads_Initialize_user_threads_body(void)
eno = pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
_Assert( eno == 0 );
- thread_entry = user_threads[ index ].thread_entry;
- if ( thread_entry == NULL ) {
- _Internal_error( INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL );
- }
-
eno = pthread_create(
&thread_id,
&attr,
- thread_entry,
+ user_threads[ index ].thread_entry,
NULL
);
if ( eno != 0 ) {
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index 0c02c21..4de9406 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -167,7 +167,7 @@ typedef enum {
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR = 24,
INTERNAL_ERROR_RESOURCE_IN_USE = 25,
INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL = 26,
- INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL = 27,
+ /* INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL = 27, */
INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK = 28,
INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE = 29,
INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL = 30,
diff --git a/testsuites/psxtests/psxfatal01/testcase.h b/testsuites/psxtests/psxfatal01/testcase.h
index a88ef48..e67f879 100644
--- a/testsuites/psxtests/psxfatal01/testcase.h
+++ b/testsuites/psxtests/psxfatal01/testcase.h
@@ -29,7 +29,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
"POSIX API Init thread create failure - NULL entry"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR \
- INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL
+ INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
void force_error(void)
{
More information about the vc
mailing list