From a3ad4afba883e56447aa40f92c1ad08d835d2564 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 10 Oct 2017 11:22:21 +0200 Subject: posix: Validate affinity sets by the scheduler Update #2514. --- cpukit/posix/src/pthreadcreate.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'cpukit/posix') 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 #include #include -#include #include #include #include @@ -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 -- cgit v1.2.3