summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-26 13:36:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-27 19:40:13 +0200
commitbbc93c119c72f981b5091fa06aea5e7369b79a59 (patch)
tree6c637a0cbfd20e32a2076395034014538de7c561 /cpukit/posix
parentReturn status code for _Scheduler_Set_affinity() (diff)
downloadrtems-bbc93c119c72f981b5091fa06aea5e7369b79a59.tar.bz2
Return status code for _Thread_Start()
This avoids having conditional statements to get the API-specific status code.
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/src/pthreadcreate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index f53cd5e310..055d304699 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -74,7 +74,6 @@ int pthread_create(
bool valid;
Thread_Configuration config;
Status_Control status;
- bool ok;
Thread_Control *the_thread;
Thread_Control *executing;
int schedpolicy = SCHED_RR;
@@ -289,7 +288,7 @@ int pthread_create(
* POSIX threads are allocated and started in one operation.
*/
_ISR_lock_ISR_disable( &lock_context );
- ok = _Thread_Start( the_thread, &entry, &lock_context );
+ status = _Thread_Start( the_thread, &entry, &lock_context );
#if defined(RTEMS_DEBUG)
/*
@@ -298,7 +297,7 @@ int pthread_create(
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
- if ( !ok ) {
+ if ( status != STATUS_SUCCESSFUL ) {
_Thread_Free( &_POSIX_Threads_Information, the_thread );
_Objects_Allocator_unlock();
return EINVAL;