diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-26 11:22:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-27 19:40:13 +0200 |
commit | 9d82150f5a83e8dcf985de26799f99f7c46ec515 (patch) | |
tree | fe568eaa83c10f1bfa6374dbe92649fac93681b6 /cpukit/posix/src/pthreadcreate.c | |
parent | rtems: Change rtems_task_get_affinity() status (diff) | |
download | rtems-9d82150f5a83e8dcf985de26799f99f7c46ec515.tar.bz2 |
Return status code for _Scheduler_Set_affinity()
This avoids having conditional statements to get the API-specific status
code.
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r-- | cpukit/posix/src/pthreadcreate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index 75d3c64676..f53cd5e310 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -251,13 +251,13 @@ int pthread_create( the_thread->Life.state |= THREAD_LIFE_CHANGE_DEFERRED; _ISR_lock_ISR_disable( &lock_context ); - ok = _Scheduler_Set_affinity( + status = _Scheduler_Set_affinity( the_thread, the_attr->affinitysetsize, the_attr->affinityset ); _ISR_lock_ISR_enable( &lock_context ); - if ( !ok ) { + if ( status != STATUS_SUCCESSFUL ) { _Thread_Free( &_POSIX_Threads_Information, the_thread ); _RTEMS_Unlock_allocator(); return EINVAL; |