summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadcreate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-10 11:22:21 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-11 07:37:54 +0200
commita3ad4afba883e56447aa40f92c1ad08d835d2564 (patch)
tree1736c0390a1d4fbb4f86ab22f7811a5a099fdbaa /cpukit/posix/src/pthreadcreate.c
parentscore: Add _Thread_queue_Dispatch_disable() (diff)
downloadrtems-a3ad4afba883e56447aa40f92c1ad08d835d2564.tar.bz2
posix: Validate affinity sets by the scheduler
Update #2514.
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r--cpukit/posix/src/pthreadcreate.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index 41e2b67122..75205f7e0a 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -29,7 +29,6 @@
#include <rtems/posix/pthreadimpl.h>
#include <rtems/posix/pthreadattrimpl.h>
#include <rtems/score/assert.h>
-#include <rtems/score/cpusetimpl.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/apimutex.h>
#include <rtems/score/stackimpl.h>
@@ -170,11 +169,9 @@ int pthread_create(
return EINVAL;
}
-#if defined(RTEMS_SMP)
- status = _CPU_set_Is_valid(the_attr->affinityset, the_attr->affinitysetsize);
- if ( !status )
+ if ( the_attr->affinityset == NULL ) {
return EINVAL;
-#endif
+ }
/*
* Currently all POSIX threads are floating point if the hardware
@@ -223,7 +220,6 @@ int pthread_create(
the_thread->Life.state |= THREAD_LIFE_CHANGE_DEFERRED;
-#if defined(RTEMS_SMP)
_ISR_lock_ISR_disable( &lock_context );
status = _Scheduler_Set_affinity(
the_thread,
@@ -236,7 +232,6 @@ int pthread_create(
_RTEMS_Unlock_allocator();
return EINVAL;
}
-#endif
/*
* finish initializing the per API structure