summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-31 23:41:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-31 23:41:56 +0000
commitc54f3cefb7c4a9d9f77490fa43ae3c051ce56f2f (patch)
treebb29e10778c23aa380a46454d28a8945342ff956 /cpukit/posix
parent2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-c54f3cefb7c4a9d9f77490fa43ae3c051ce56f2f.tar.bz2
2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/pthreadinitthreads.c: Clean up error paths.
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/src/pthreadinitthreads.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index 0e452ad7a0..68ba28d6b1 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -67,14 +67,12 @@ void _POSIX_Threads_Initialize_user_threads_body( void )
*/
for ( index=0 ; index < maximum ; index++ ) {
- status = pthread_attr_init( &attr );
- assert( !status );
-
- status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
- assert( !status );
-
- status = pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
- assert( !status );
+ /*
+ * There is no way for these calls to fail in this situation.
+ */
+ (void) pthread_attr_init( &attr );
+ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
+ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
status = pthread_create(
&thread_id,
@@ -82,7 +80,8 @@ void _POSIX_Threads_Initialize_user_threads_body( void )
user_threads[ index ].thread_entry,
NULL
);
- assert( !status );
+ if ( status )
+ _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status );
}
}